![]() Note that you don't need to use gosu I just use the following command to actually start the Jenkins process at the end of my entrypoint script: ![]() Most of the other solutions I've seen in this thread are just too fragile or need a lot of weird conditions (or are outright dangerous, like setting 777 permissions on the socket file, or running Jenkins as root). Adds the docker group to the jenkins user.Retrieves the docker gid from the host and modifies the container docker gid to match.Have the Docker container start as root ( USER root in the Dockerfile before your entrypoint at least).Have Docker installed inside the container (as part of your Dockerfile build).Mount /var/run/docker.sock into the container from the host. ![]() To be clear, to do DinD with Jenkins in Docker, you should: Example ( ) is the best/cleanest way I've been able to do this-I have tested in a build I'm using in a variety of environments (local Mac, local Windows, Ubuntu in AWS, Kubernetes in AKS, and Kubernetes in local VirtualBox with Debian). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |