JetBrains / teamcity-docker-agent

TeamCity agent docker image sources
https://hub.docker.com/r/jetbrains/teamcity-agent/
Apache License 2.0
77 stars 64 forks source link

DOCKER_IN_DOCKER and Fargate #48

Open knepe opened 5 years ago

knepe commented 5 years ago

Can't seem to get DOCKER_IN_DOCKER=start work for Fargate tasks.. Is it supported? This is the error I get on builds which uses docker stuff (not the Docker plugin): Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? I have set environment variable DOCKER_IN_DOCKER=start Anyone got this to work with Fargate tasks?

FYI: It works with EC2 tasks

1scrooge commented 5 years ago

@knepe use docker flag privileged: true

knepe commented 5 years ago

@1scrooge Not available when using Fargate

kir commented 5 years ago

Looks like not possible on FarGate. https://stackoverflow.com/questions/48390279/dind-and-aws-fargate-ci

1scrooge commented 5 years ago

Yep. @kir is right

jeandet commented 5 years ago

Hi, what about using this image as base image? This seems to be the right way to do https://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/. This would ease a lot the DIND setup and allow multiple agent per host.

kir commented 5 years ago

Hi @jeandet, could you please explain a bit more? You're referring to the official docker-in-docker image, and at the same time referring to an article where docker-in-docker considered harmful (and docker.sock approach is preferred).

Thanks,

jeandet commented 5 years ago

@kir you are right, in my understanding both are harmful, docker.sock has many issues like exposing host docker and thus shares volumes path while real dind seems to isolate inner volumes from host (but has many other issues). I don't have an isolated dind setup working right now, I still use the docker.sock option. This is not convenient with docker cloud plugin, you have to set a different path for each agent volume.

kir commented 5 years ago

OK, that's right. Back to the original issue, is it OK I close it, as there is not viable solution for dind and Fargate?