TritonDataCenter / sdc-docker

Docker Engine for Triton
Mozilla Public License 2.0
182 stars 49 forks source link

/var/run/docker.sock alternative ? #115

Closed lucj closed 7 years ago

lucj commented 7 years ago

Several Docker images rely on the host's /var/run/docker.sock socket to get events from the docker host and start/stop containers. As this socket is not available when running Docker containers on Triton, what is the recommended way to do it ? My use case is the setup of a CI/CD pipeline, especially the CD part, where a service could regularly check new version of an image (available on the DockerHub) and update the running services based on this image.

jclulow commented 7 years ago

I think it makes sense to generate key material inside the container that needs access to the Docker API, add it to the appropriate Triton account(s), and have the software make regular HTTPS API calls to the Triton data centre(s) to which it needs to communicate.

tgross commented 7 years ago

@lucj for my team's Jenkins environment we do just as @jclulow is suggesting. See https://github.com/autopilotpattern/mysql/blob/master/makefile for an example of what the job itself might look like.

lucj commented 7 years ago

@jclulow @tgross thanks a lot, really interesting approach, I'll check this carrefully.

jwreagor commented 7 years ago

@lucj How do we feel about closing this issue?

lucj commented 7 years ago

Sorry, I should have closed it earlier. Thanks for your help.

jwreagor commented 7 years ago

@lucj No problem at all, thanks.