Questions tagged [docker-in-docker]

15 questions
32
votes
2 answers

Why is Docker-in-Docker considered bad?

In August 2013 Jérôme Petazzoni created Docker in Docker, dind for short, this allowed Docker containers to be created inside of Docker Containers, this functionality proved very popular resulting in Jérôme's GitHub Repository receiving over a…
Richard Slater
  • 11,747
  • 7
  • 43
  • 82
16
votes
2 answers

Docker In Kubernetes Deployment

I am using a third party library that creates sibling docker containers via: docker run -d /var/run/docker.sock:/var/run/docker.sock ... I am trying to create a Kubernetes deployment out of the above container, but currently getting: Cannot…
rys
  • 339
  • 1
  • 3
  • 9
13
votes
2 answers

Gitlab CI error during connect: Get http://docker:2375/v1.40/containers/json?all=1: dial tcp: lookup docker on xx.xx.xx.x:xx: no such host

I've recently created a new repository in gitlab.com, started a new Ubuntu instance in digitalocean, installed docker and gitlab-runner in the ubuntu instance. Also, did gitlab-runner register and passed the correct host and token from gitlab.com…
punkbit
  • 349
  • 1
  • 2
  • 10
7
votes
1 answer

What are alternatives for Docker in Docker (dind) usage for Jenkins slave running in container?

When using Jenkins slave running in container, what are alternatives or "safe" (in terms of security) implementations for Docker in Docker. Architecture example: Jenkins master running as Docker container Jenkins slave running as Docker…
rombob
  • 657
  • 5
  • 16
5
votes
1 answer

docker-compose fails to recognize when images are rebuilt sometimes ... often same code is OK

I have a devops container inside of which I execute docker build and docker-compose up commands which run OK then (on same server or different server with same code) sometimes incorrectly fail to Recreate sibling containers after their images are…
Scott Stensland
  • 479
  • 3
  • 15
5
votes
2 answers

Multiple runners for all projects OR single runner per project

What do we have: We have a Gitlab EE with multiple projects running on a droplet, next to that we have a runner server for the CI runners. All projects are Docker projects and 4 runners can be busy at the same time. What we need to know: Now is my…
SurudoiRyu
  • 191
  • 1
  • 9
4
votes
1 answer

Multi platform test on Travis-CI using Docker

I am trying to write my .travis.yml to perform multi platform test on Travis-CI using Docker. The platforms I want to test on: Ubuntu 14.04 Ubuntu 16.04 Debian 8 Debian 9 The whole concept in a nutshell is (for all 4 distros): docker pull…
4
votes
0 answers

How to run nerdctl run inside a container?

This is not for building inside a container, this is for running containerized CLI tools in a Job. I know the security implications. This is a lateral move security wise from DooD just to get us to EKS 1.24 while we transition away from running…
Shanteva
  • 153
  • 6
4
votes
2 answers

Build Docker images with DinD and BuildKit

I use GitLab's pipelines to describe the deployment process. And, as part of it, I build Docker images. For that purpose, I use Docker-in-Docker to build those images (i.e. download the Docker-in-Docker image and do all the Docker-stuff, inside of…
acd
  • 121
  • 2
  • 6
2
votes
1 answer

Multiple Microservices in CI environment

hey we have a GitLab stage and inside that we need to start an environment with several containers we pull from a local registry. We use compose and a docker in docker solution for that at the moment. The problem is, that the compose.yml now hold…
2
votes
2 answers

docker build throws UnknownHostException with jenkins dind slave + kubernetes plugin

So Jenkins is installed inside the cluster with this official helm chart. And this is my installed plugins as per helm release values: installPlugins: - kubernetes:1.18.1 - workflow-job:2.33 - workflow-aggregator:2.6 -…
2
votes
0 answers

Using docker cloud from jenkins running on local osx docker

Hopefully someone can help, I've found lots of information online but as I'm brand new to both jenkins and docker, I'm having a hard time sorting out which suggested solutions happen on the what machine, so I'm cargo culting without any…
Iain Duncan
  • 121
  • 3
2
votes
1 answer

Run docker-in-docker container alongside Jenkins agent

I'm looking for a way to run a Docker-in-Docker (dind) container alongside my Jenkins agent nodes using the Jenkins Kubernetes Plugin configured by Jenkins Configuration-as-Code (JCasC). I'm currently running a plain agent node, that has all my…
Max N.
  • 413
  • 6
  • 13
2
votes
2 answers

Running builds requiring docker daemon in Jenkins installed using helm and running as containerd container

Jenkins is installed using official helm chart on Kubernetes cluster that uses containerd as container runtime. How to configure containerized agents which will run docker client commands e.g. for building docker images. There's no docker daemon on…
0
votes
2 answers

Building a docker container in a gitlab ci job

I am trying to build a docker image as part of a gitlab ci job. I work on my own gitlab instance with a separate machine running ci jobs. I have tried and failed with many different configurations for using Docker in Docker. My current try is the…
Henrik
  • 3
  • 3