您可以将Docker-in-Docker部署到Heroku平台吗? [英] Can you deploy Docker-in-Docker to the Heroku Platform?

查看:145
本文介绍了您可以将Docker-in-Docker部署到Heroku平台吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试构建Docker映像并将其推送到Heroku容器注册表中,然后像这样发布它们:

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

我有一个特殊的用例,要求我让Docker Daemon在Docker容器中运行.据我了解,除非在docker run命令中提供了--privileged标志,否则无法在Docker容器中运行Docker Daemon.

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.

是否可以在特权模式下在Heroku平台上运行Docker容器,或者使用其他方法将Docker-in-Docker部署到该平台?

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?

推荐答案

Heroku说:

我们强烈建议以非root用户身份在本地测试映像,因为容器不是在Heroku上以root特权运行的.

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和运行时

如果他们提供了替代功能,我会感到非常惊讶,这将对他们构成严重的安全风险.您可能必须找到不需要特权提升的解决方案.

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.

这篇关于您可以将Docker-in-Docker部署到Heroku平台吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆