代码之家  ›  专栏  ›  技术社区  ›  Nitin

在AWS ECS中将带有卷参数的docker容器作为任务定义或服务运行

  •  1
  • Nitin  · 技术社区  · 6 年前

    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 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容器时的参数。

    我能提供吗 -五

    1 回复  |  直到 6 年前
        1
  •  1
  •   bluescores    6 年前

    v标志是绑定装入卷的简写。 Here's the AWS documentation for that 节,将该卷装入容器。

    AWS Fargate当前不支持绑定安装 . 如果设置使用此nginx代理设置,您将希望坚持使用EC2主机的ECS。 编辑 :这不再是事实,Fargate目前支持绑定挂载(感谢@bobics)