search

Home  >  Q&A  >  body text

Docker Hub上下载的nginx镜像,配置文件放在数据卷中吗?

直接使用Docker Hub上下载的nginx镜像,但是自己的nginx的配置文件放在哪里呢?数据卷中吗?
如果是,那么要做什么设置吗,还是放在里面就不用管了,它会自动去读取?

迷茫迷茫2771 days ago870

reply all(4)I'll reply

  • phpcn_u1582

    phpcn_u15822017-04-24 16:02:14

    I still prefer to put it on the host and use -v to mount it to the container

    reply
    0
  • 为情所困

    为情所困2017-04-24 16:02:14

    If it is the testing stage, it is recommended to map the data volume, and when deploying the production environment, it is recommended to mirror it.

    reply
    0
  • 迷茫

    迷茫2017-04-24 16:02:14

    Generally, you should mount the local configuration file, use -v to mount, the nginx image description page of Docker Hub has usage instructions: https://hub.docker.com/_/nginx/

    reply
    0
  • ringa_lee

    ringa_lee2017-04-24 16:02:14

    -v mount. It can be placed in the image during deployment.

    reply
    0
  • Cancelreply