Showing 4 result(s)

Install CloudFoundry on an M1 Mac (arm64)

Install Rosetta 2

/usr/sbin/softwareupdate --install-rosetta --agree-to-license

Install Homebrew under Rosetta 2 (/usr/local/Homebrew)

arch -x86_64 /bin/bash -c "$(curl -fsSL"

Tap Cloudfoundry

arch -x86_64 /usr/local/Homebrew/bin/brew tap cloudfoundry/tap

Install CloudFoundry

arch -x86_64 /usr/local/Homebrew/bin/brew install cf-cli@7

GitLab CI: failed to dial gRPC: cannot connect to the Docker daemon. Is ‘docker daemon’ running on this host?

The latest docker:dind has breaking changes. Here are two fixes if you are enchanting issues with GitLab CI and your runners.

Fix 1: GitLab CI Config

Add the following to your .gitlab-ci.yml


Fix 2: Change runner config

Alternatively, another fix is to change the runner:

$ nano /etc/gitlab-runner/config.toml

Modify to mach the following (specifically environment and volumes)

  environment = ["DOCKER_DRIVER=overlay2","DOCKER_TLS_VERIFY=1","DOCKER_CERT_PATH=/certs/client"]
    image = "docker:dind"
    privileged = true
    disable_entrypoint_overwrite = false
    oom_kill_disable = false
    disable_cache = false
    volumes = ["/cache","/certs"]

Then restart the gitlab runner

$ service gitlab-runner restart

I hope at least one of these fixes resolves your issues.

Docker stop all Containers

Last brain dump of today. Here’s some quick commands to stop running docker containers and also clean up afterwards (remove container files, and images).

Stop all containers:

docker stop $(docker ps -aq)

Remove all containers:

docker rm $(docker ps -aq)

Remove all images:

docker rmi $(docker images -q)

GitLab : Build Docker Image within CI/CD Pipeline

Another brain dump for future reference. This is when setting up gitlab to build and run docker images when the CI/CD pipeline runs.

Install gitlab-runner

On a linux x86-64 download the gitlab-runner package:

sudo wget -O /usr/local/bin/gitlab-runner

Give it permissions:

sudo chmod +x /usr/local/bin/gitlab-runner

Install docker:

curl -sSL | sh

Create the gitlab-runner user:

sudo useradd --comment 'GitLab Runner' --create-home gitlab-runner --shell /bin/bash

Install gitlab-runner:

sudo gitlab-runner install --user=gitlab-runner --working-directory=/home/gitlab-runner

Start the gitlab-runner:

sudo gitlab-runner start

Register the gitlab-runner

Register the gitlab-runner:

sudo gitlab-runner register -n \
  --url \
  --registration-token REGISTRATION_TOKEN \
  --executor shell \
  --description "My Runner"

Add the gitlab-runner user to the docker group:

sudo usermod -aG docker gitlab-runner

Verify the gitlab-runner has docker access:

sudo -u gitlab-runner -H docker info

Creating your .gitlab-ci-yml

You can now test the runner by committing the .gitlab-ci.yml and testing:

  - docker info

    - docker build -t my-docker-image .
    - docker run my-docker-image /script/to/run/tests