stream浪者pipe理docker集装箱不启动
我一直在试图写一个stream浪文件来启动我的docker容器来运行我一直在写的一个小型的networking应用程序。 但是,当我尝试使用stream浪汉,我最终得到一个错误说
The container started either never left the "stopped" state or very quickly reverted to the "stopped" state. This is usually because the container didn't execute a command that kept it running, and usually indicates a misconfiguration. If you meant for this container to not remain running, please set the Docker provider configuration "remains_running" to "false": config.vm.provider "docker" do |d| d.remains_running = false end
我对stream浪汉非常陌生,所以我不确定尝试解决问题的最好方法是什么。
我的stream浪文件包含
Vagrant.configure("2") do |config| config.vm.synced_folder "thelibrary", "/thelibrary" config.vm.provider "docker" do |d| d.image = "django-dev" d.has_ssh = false d.ports = ["8000:8000"] d.cmd = ["python", "/thelibrary/manage.py", "runserver", "0.0.0.0:8000"] end end
我不知道为什么说这个命令不能继续运行。 我可以使用相同的命令运行docker容器,它将启动我的django应用程序,没有任何问题。
我花了一天试图让docker机运行..终于得到它的工作。 这是我在我的vangrant文件中,希望这至less可以让你开始:
config.vm.provider :docker do |d| d.image = "paintedfox/postgresql" d.name = "db" d.cmd = ["/sbin/my_init", "--enable-insecure-key"] end
stream浪地位回报我这个:
当前机器状态:
开发运行(docker)
你可以尝试的另一个解决scheme是删除所有现有的图像,并重新开始,这可能是你的图像被破坏。
- Docker continuum / miniconda3容器不显示“conda”
- configuration一个uwsgi.ini文件,以便DJango项目在Docker容器中工作
- Django和Docker:pipe理生产和开发环境之间的依赖关系
- 为什么python manage.py collectstatic不要将文件复制到正确的位置?
- 在docker-compose中使用network_mode ='host'break run:主机typesnetworking不能与链接一起使用
- 使用docker-compose链接django和mysql容器
- 如何将docker-compose.yml转换为Django的Dockerrun.aws.json
- Docker在django web应用+ postgres数据库上编写运行迁移
- 如何访问docker-compose中的Postgres数据库