【发布时间】:2018-11-10 10:02:05
【问题描述】:
我正在使用nginx-proxy docker 映像来代理我的其他 Web 应用程序。 我可以使用
运行此图像docker run -d -p 80:80 -e ENABLE_IPV6=true -v /var/run/docker.sock:/tmp/docker.sock:ro jwilder/nginx-proxy
命令。如果我在没有-v 的情况下运行 docker,这里-v 选项是强制性的
即
docker run -d -p 80:80 -e ENABLE_IPV6=true jwilder/nginx-proxy
它给出了错误:
ERROR: you need to share your Docker host socket with a volume at /tmp/docker.sock
Typically you should run your jwilder/nginx-proxy with: `-v /var/run/docker.sock:/tmp/docker.sock:ro`
See the documentation at http://git.io/vZaGJ
WARNING: /etc/nginx/dhparam/dhparam.pem was not found. A pre-generated dhparam.pem will be used for now while a new one is being generated in the background. Once the new dhparam.pem is in place, nginx will be reloaded.
现在我的问题是,当我使用 AWS ECS 任务定义或服务运行此 docker 容器时,如何提供此 -v 参数。
我可以在 Dockerfile 中提供-v 参数吗?
【问题讨论】:
标签: docker nginx amazon-ecs aws-ecs docker-gen