GitLab : fix "cgroups: cgroup mountpoint does not exist: unknown"

Mar 27, 2024 by Thibault Debatty | 115 views

GitLab Sysadmin Docker

If you use GitLab pipelines to build Docker image, you may encounter the error "cgroups: cgroup mountpoint does not exist: unknown". Here is how to fix...


The solution is actually pretty simple, but I hope this post will avoid you some searching time over the Internet...

The reason is most probably that your GitLab build job is using some old Docker-in-Docker images.

So the solution is simply to update your .gitlab-ci.yml to use the latest Docker images (25) at the time of writing:

  image: docker:25-cli
    - docker:25-dind
  ## Run on a gitlab-runner that is configured with docker-in-docker
    - dind
  stage: test
    # Login, build and push Docker image
    - docker build -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_SHA" -t "$CI_REGISTRY_IMAGE:latest" .
    - docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_SHA"
    - docker push "$CI_REGISTRY_IMAGE:latest"

If needed, you can find the tag for the latest Docker images on the official Docker Hub page:

This blog post is licensed under CC BY-SA 4.0