
运维
nightseventhunit
道可道,非常道,名可名,非常名。
展开
-
将宿主机的目录挂载到正在运行的docker容器中,并实现同步
修改配置文件(需停止docker服务)1、停止docker服务systemctl stop docker.service(关键,修改之前必须停止docker服务)2、vim /var/lib/docker/containers/container-ID/config.v2.json修改配置文件中的目录位置,然后保存退出"MountPoints":{"/home":{"Source":"/docker","Destination":"/home","RW":true,"Name":"","D.原创 2020-11-19 10:10:57 · 1769 阅读 · 0 评论 -
如何修改正在运行的docker容器映射端口
修改容器配置文件,重启docker服务需要注意:该方法需要重启整个docker服务,如果在同一个宿主机上运行着多个容器服务的话,就会影响其他容器服务。systemctl stop docker先停止docker服务,此步骤较重要,如果是restart 则修改hostconfig.json配置文件之后,不起作用。容器的配置文件路径/var/lib/docker/containers/[hash_of_the_container]/hostconfig.json其中的hashofthec原创 2020-11-19 10:08:51 · 723 阅读 · 0 评论 -
如何在不重新启动Nginx的情况下使修改生效?或nginx -s reload 不起作用的办法
nginx支持以下信号TERM, INT - Quick shutdownQUIT - Graceful shutdownHUP - Configuration reload: Start the new worker processes with a new configuration, Gracefully shutdown the old worker processesUSR1 - Reopen the log filesUSR2 - Upgrade Executable on原创 2020-11-19 10:03:42 · 766 阅读 · 0 评论