You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I struggled to use cqfd with Docker in Docker.
Especially, I wanted to be able to launch Docker commands inside cqfd without requiring sudo.
Below is how I did it.
Can you confirm to me that this is a good way to do it ?
If yes, I can add this example to the documentation.
Steps to reproduce
Create Dockerfile and .cqfdrc as below
Launch cqfd init with this command : CQFD_EXTRA_BUILD_ARGS="--build-arg DOCKER_GID=$(getent group docker | cut -d: -f3)" cqfd init
Launch cqfd run
You should see the docker ps output with the cqfd Docker running
How it works
The Docker socket is passed inside cqfd with volume mapping. However, this socket is owned by the Docker group of the host. To be able to use it inside cqfd you need :
Your user to be part of the docker group
The docker group to have the same gid inside the cqfd container and on the host
The files
.cqfd/Docker/Dockerfile :
FROM ubuntu:24.04
# Create the docker group before installing docker# This is needed to have the same docker gid as the host and be able to use# the docker socket for docker in dockerARG DOCKER_GID
RUN groupadd -g ${DOCKER_GID} docker
RUN apt-get update && apt-get install -y docker.io
I struggled to use cqfd with Docker in Docker.
Especially, I wanted to be able to launch Docker commands inside cqfd without requiring sudo.
Below is how I did it.
Can you confirm to me that this is a good way to do it ?
If yes, I can add this example to the documentation.
Steps to reproduce
CQFD_EXTRA_BUILD_ARGS="--build-arg DOCKER_GID=$(getent group docker | cut -d: -f3)" cqfd init
cqfd run
How it works
The Docker socket is passed inside cqfd with volume mapping. However, this socket is owned by the Docker group of the host. To be able to use it inside cqfd you need :
The files
.cqfd/Docker/Dockerfile :
.cqfdrc
The text was updated successfully, but these errors were encountered: