84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
直接使用Docker Hub上下载的nginx镜像,但是自己的nginx的配置文件放在哪里呢?数据卷中吗? 如果是,那么要做什么设置吗,还是放在里面就不用管了,它会自动去读取?
业精于勤,荒于嬉;行成于思,毁于随。
I still prefer to put it on the host and use -v to mount it to the container
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.
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/
-v mount. It can be placed in the image during deployment.
I still prefer to put it on the host and use -v to mount it to the container
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.
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/
-v mount. It can be placed in the image during deployment.