问题
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?
回答1:
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.
来源:https://stackoverflow.com/questions/52897933/can-you-deploy-docker-in-docker-to-the-heroku-platform