### Pull and Run capi-go-units Docker Image Source: https://context7.com/cloudfoundry/capi-dockerfiles/llms.txt Pull the go-units image and run a container for Go unit tests. Start PostgreSQL and verify the locket database connection. ```bash # Pull the go-units image docker pull cloudfoundry/capi:go-units # Run Go unit tests in the container docker run -it cloudfoundry/capi:go-units bash # Start PostgreSQL and verify locket database service postgresql start psql -h localhost -U locket -d locket -c "SELECT current_database();" # Output: locket ``` -------------------------------- ### Compile Protocol Buffer Definitions Source: https://context7.com/cloudfoundry/capi-dockerfiles/llms.txt Use the protobuf compiler (protoc) to compile protocol buffer definitions, for example, 'myservice.proto' to Ruby output. ```bash # Compile protocol buffer definitions protoc --ruby_out=. myservice.proto ``` -------------------------------- ### Pull and Run capi-runtime-ci Docker Image Source: https://context7.com/cloudfoundry/capi-dockerfiles/llms.txt Pull the runtime-ci image and run a container for runtime CI tasks. Verify BOSH CLI and protobuf compiler installations. ```bash # Pull the runtime-ci image docker pull cloudfoundry/capi:runtime-ci # Run runtime CI tasks in the container docker run -it cloudfoundry/capi:runtime-ci bash # Verify BOSH CLI installation bosh --version # Output: version 7.10.2-... # Verify protobuf compiler protoc --version # Output: libprotoc 3.6.1 ``` -------------------------------- ### Pull and Run capi-ruby-units Docker Image Source: https://context7.com/cloudfoundry/capi-dockerfiles/llms.txt Pull the ruby-units image and run a container for executing Ruby unit tests. Start MySQL and PostgreSQL services and verify their connections. ```bash # Pull the ruby-units image docker pull cloudfoundry/capi:ruby-units # Run Ruby unit tests in the container docker run -it cloudfoundry/capi:ruby-units bash # Start database services inside container service mysql start service postgresql start # Verify MySQL connection mysql -u root -ppassword -e "SELECT VERSION();" # Output: 8.0.x # Verify PostgreSQL connection psql -U postgres -c "SELECT version();" # Output: PostgreSQL 17.x ``` -------------------------------- ### Run Go Tests for CloudFoundry Components Source: https://context7.com/cloudfoundry/capi-dockerfiles/llms.txt Clone the locket repository and run Go tests using 'go test ./...'. ```bash # Run Go tests for CloudFoundry components git clone https://github.com/cloudfoundry/locket.git cd locket go test ./... ``` -------------------------------- ### Build and Push bosh-lite Docker Image Source: https://context7.com/cloudfoundry/capi-dockerfiles/llms.txt Build the bosh-lite Docker image locally and push it to Docker Hub. ```bash # Build the image locally cd bosh-lite docker build -t cloudfoundry/capi:bosh-lite . # Push to Docker Hub docker push cloudfoundry/capi:bosh-lite ``` -------------------------------- ### Pull and Run rc-docs Docker Image Source: https://context7.com/cloudfoundry/capi-dockerfiles/llms.txt Pull the rc-docs image and run a container for generating CloudFoundry API documentation. Clone the Cloud Controller repository and build the documentation. ```bash # Pull the rc-docs image docker pull cloudfoundry/capi:rc-docs # Generate API documentation docker run -it cloudfoundry/capi:rc-docs bash # Clone Cloud Controller and generate docs git clone https://github.com/cloudfoundry/cloud_controller_ng.git cd cloud_controller_ng/docs/v3 bundle exec middleman build ``` -------------------------------- ### Build and Push Docker Image Source: https://github.com/cloudfoundry/capi-dockerfiles/blob/main/README.md Use this command to build a Docker image and push it to the repository. Ensure you are in the directory of the specific image you want to build. ```bash cd capi-ruby-units docker build -t $(cat repository) . docker push $(cat repository) ``` -------------------------------- ### Build and Push capi-runtime-ci Docker Image Source: https://context7.com/cloudfoundry/capi-dockerfiles/llms.txt Build the capi-runtime-ci Docker image locally and push it to Docker Hub. ```bash # Build the image locally cd capi-runtime-ci docker build -t cloudfoundry/capi:runtime-ci . docker push cloudfoundry/capi:runtime-ci ``` -------------------------------- ### Build and Push capi-go-units Docker Image Source: https://context7.com/cloudfoundry/capi-dockerfiles/llms.txt Build the capi-go-units Docker image locally and push it to Docker Hub. ```bash # Build the image locally cd capi-go-units docker build -t cloudfoundry/capi:go-units . docker push cloudfoundry/capi:go-units ``` -------------------------------- ### Build and Push rc-docs Docker Image Source: https://context7.com/cloudfoundry/capi-dockerfiles/llms.txt Build the rc-docs Docker image locally and push it to Docker Hub. ```bash # Build the image locally cd rc-docs docker build -t cloudfoundry/capi:rc-docs . docker push cloudfoundry/capi:rc-docs ``` -------------------------------- ### Build and Push Docker Image Source: https://context7.com/cloudfoundry/capi-dockerfiles/llms.txt Reads the repository tag from a file, builds a Docker image with that tag, and pushes it to Docker Hub. This is a common workflow for versioning and distributing containerized applications. ```bash cat repository docker build -t $(cat repository) . docker push $(cat repository) ``` -------------------------------- ### Pull and Run bosh-lite Docker Image Source: https://context7.com/cloudfoundry/capi-dockerfiles/llms.txt Use these commands to pull the bosh-lite image and run a container for BOSH deployment tasks. Verify the BOSH CLI and gcloud versions within the container. ```bash # Pull the bosh-lite image docker pull cloudfoundry/capi:bosh-lite # Run a container for BOSH deployment tasks docker run -it cloudfoundry/capi:bosh-lite bash # Inside the container, verify BOSH CLI bosh --version # Output: version 7.10.2-... # Use gcloud for GCP operations gcloud version # Google Cloud SDK ... # gsutil ... ``` -------------------------------- ### Build Docker Image on ARM Mac Source: https://github.com/cloudfoundry/capi-dockerfiles/blob/main/README.md To build the capi-ruby-units image on an ARM Mac, specify the platform as linux/amd64 because mysql 8.0 is not available for arm64. ```bash cd capi-ruby-units docker build --platform linux/amd64 -t $(cat repository) . ``` -------------------------------- ### Generic Docker Image Build Command Source: https://context7.com/cloudfoundry/capi-dockerfiles/llms.txt A generic command template for building any Docker image within its respective directory in the repository. ```bash # Generic build command for any image directory cd ``` -------------------------------- ### Build capi-ruby-units Docker Image for ARM Source: https://context7.com/cloudfoundry/capi-dockerfiles/llms.txt Build the ruby-units Docker image specifically for ARM architecture, using the --platform flag as MySQL 8.0 is not available for arm64. ```bash # Build on ARM Mac (MySQL 8.0 not available for arm64) cd capi-ruby-units docker build --platform linux/amd64 -t cloudfoundry/capi:ruby-units . ``` -------------------------------- ### Build Docker Image for ARM Mac Source: https://context7.com/cloudfoundry/capi-dockerfiles/llms.txt Builds a Docker image specifically for the linux/amd64 platform, useful when developing on ARM-based machines like Macs to ensure compatibility. It uses the tag from the 'repository' file. ```bash docker build --platform linux/amd64 -t $(cat repository) . ``` -------------------------------- ### Run Cloud Controller Ruby Unit Tests Source: https://context7.com/cloudfoundry/capi-dockerfiles/llms.txt Clone the cloud_controller_ng repository and run unit tests using bundle exec rspec. ```bash # Run Cloud Controller tests (example workflow) git clone https://github.com/cloudfoundry/cloud_controller_ng.git cd cloud_controller_ng bundle exec rspec spec/unit ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.