docker-in-docker

What is the result of mounting `/var/run/docker.sock` in a Docker in Docker scenario?

我只是一个虾纸丫 提交于 2021-02-08 19:22:32
问题 I've read Can anyone explain docker.sock to understand what /var/run/docker.sock does, but its use in GitLab CI's Use Docker socket binding has me confused. Here is their example command for the gitlab-runner registration: sudo gitlab-runner register -n \ --url https://gitlab.com/ \ --registration-token REGISTRATION_TOKEN \ --executor docker \ --description "My Docker Runner" \ --docker-image "docker:19.03.12" \ --docker-volumes /var/run/docker.sock:/var/run/docker.sock I see two places that

Connecting to docker-in-docker from a GitLab CI runner

瘦欲@ 提交于 2021-02-04 10:46:16
问题 I have a GitLab pipeline that I want to: Build a Java app Test using docker-compose Push to my Docker repository The primary issue I'm having is that this works : services: - docker:dind docker_test: stage: docker_test image: docker:latest script: - docker version The output is printed as expected: > gitlab-ci-multi-runner exec docker --docker-privileged docker_test ... $ docker version Client: Version: 17.06.0-ce ... Server: Version: 17.06.0-ce ... Build succeeded While this does not

How to find out which user is accessing /var/run/docker.sock that will cause permission denied error

时光怂恿深爱的人放手 提交于 2020-08-26 04:37:47
问题 This question is different from the following questions: Docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock Because they didn't consider jenkins to be installed as docker container, here I don't have jenkins user to give that user access to this file. And also from this one docker.sock permission denied Because I don't know which user I got this error for, Here the user root has access to this file but the error happened again.

How to find out which user is accessing /var/run/docker.sock that will cause permission denied error

二次信任 提交于 2020-08-26 04:35:11
问题 This question is different from the following questions: Docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock Because they didn't consider jenkins to be installed as docker container, here I don't have jenkins user to give that user access to this file. And also from this one docker.sock permission denied Because I don't know which user I got this error for, Here the user root has access to this file but the error happened again.

Docker Container Networking with Docker-in-Docker

梦想与她 提交于 2020-07-17 03:54:49
问题 I would like to network with a child docker container from a parent docker container, with a docker-in-docker setup. Let's say I'm trying to connect to a simple Apache httpd server. When I run the httpd container on my host machine, everything works fine: asnyder:~$ docker run -d -p 8080:80 httpd:alpine asnyder:~$ curl localhost:8080 <html><body><h1>It works!</h1></body></html> But when I do the same from a docker-in-docker setup, I get a Connection refused error: asnyder:~$ docker run -d -

Docker Container Networking with Docker-in-Docker

独自空忆成欢 提交于 2020-07-17 03:54:18
问题 I would like to network with a child docker container from a parent docker container, with a docker-in-docker setup. Let's say I'm trying to connect to a simple Apache httpd server. When I run the httpd container on my host machine, everything works fine: asnyder:~$ docker run -d -p 8080:80 httpd:alpine asnyder:~$ curl localhost:8080 <html><body><h1>It works!</h1></body></html> But when I do the same from a docker-in-docker setup, I get a Connection refused error: asnyder:~$ docker run -d -

Permission denied error invoking Docker on Mac host from inside Docker Ubuntu container as non-root user

痴心易碎 提交于 2020-05-25 17:22:19
问题 I'm trying to invoke docker on my OSX host running Docker for Mac 17.06.0-ce-mac17 from inside a running jenkins docker container (jenkins:latest), per the procedure described at http://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/.   I mount /var/run/docker.sock into the container, I stick a ubuntu docker binary inside it, and it's able to execute - but from inside the container as user "jenkins" when I run e.g. "docker ps" I get Got permission denied while trying to

Permission denied error invoking Docker on Mac host from inside Docker Ubuntu container as non-root user

让人想犯罪 __ 提交于 2020-05-25 17:19:30
问题 I'm trying to invoke docker on my OSX host running Docker for Mac 17.06.0-ce-mac17 from inside a running jenkins docker container (jenkins:latest), per the procedure described at http://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/.   I mount /var/run/docker.sock into the container, I stick a ubuntu docker binary inside it, and it's able to execute - but from inside the container as user "jenkins" when I run e.g. "docker ps" I get Got permission denied while trying to

Permission denied error invoking Docker on Mac host from inside Docker Ubuntu container as non-root user

老子叫甜甜 提交于 2020-05-25 17:19:02
问题 I'm trying to invoke docker on my OSX host running Docker for Mac 17.06.0-ce-mac17 from inside a running jenkins docker container (jenkins:latest), per the procedure described at http://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/.   I mount /var/run/docker.sock into the container, I stick a ubuntu docker binary inside it, and it's able to execute - but from inside the container as user "jenkins" when I run e.g. "docker ps" I get Got permission denied while trying to

Docker in docker routing within Kubernetes

五迷三道 提交于 2020-02-07 00:39:31
问题 I've network related issue on the Kubernetes host, using Calico network layer. For continuous integration I need to run docker in docker, but running simple docker build with this Dockerfile : FROM praqma/network-multitool AS build RUN route RUN ping -c 4 google.com RUN traceroute google.com produces output: Step 1/4 : FROM praqma/network-multitool AS build ---> 3619cb81e582 Step 2/4 : RUN route ---> Running in 80bda13a9860 Kernel IP routing table Destination Gateway Genmask Flags Metric Ref