kshah
kshah

Reputation: 1847

Can you deploy Docker-in-Docker to the Heroku Platform?

I have been experimenting with building and pushing Docker images to the Heroku container registry, then releasing them like so:

heroku container:login
heroku create some-app-name
heroku container:push web --app some-app-name
heroku container:release web --app some-app-name

I have a particular use case that requires me to have the Docker Daemon running inside of a Docker container. To my understanding, it is not possible to run the Docker Daemon within a Docker container unless the --privileged flag is supplied to the docker run command.

Is there a way to run a Docker container on the Heroku platform in privileged mode, or using some other method deploy Docker-in-Docker to this platform?

Upvotes: 0

Views: 420

Answers (1)

rayepps
rayepps

Reputation: 2092

Heroku Says:

We strongly recommend testing images locally as a non-root user, as containers are not run with root privileges on Heroku

https://devcenter.heroku.com/articles/container-registry-and-runtime

I would be very surprised if they made an override available, it would be a serious security risk for them. You'll probably have to find a solution that does not require the upped privileges.

Upvotes: 1

Related Questions