File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 4444> 为了让容器内脚本可写目录和文件,如日志(runtime/、web/),容器目录需要设置 www-data 用户和组
4545``` shell
4646docker exec -it $containerIdorName chown -R www-data:www-data /var/www
47- // 脚本化
47+ # 脚本化
4848ssh $ip " docker exec $containerIdorName chown -R www-data:www-data /var/www"
4949```
5050
@@ -65,10 +65,10 @@ chmod +x /usr/local/bin/docker-compose
6565```
6666
67673 . 配置容器日志
68- - registry-mirrors,设置镜像源
69- - graph,设置 docker 运行时根目录,默认是 /var/lib/docker
70- - log-x,日志相关配置
7168``` shell
69+ # registry-mirrors,设置镜像源
70+ # graph,设置 docker 运行时根目录,默认是 /var/lib/docker
71+ # log-x,日志相关配置
7272cat > /etc/docker/daemon.json << EOF
7373{
7474 "registry-mirrors": ["https://docker.mirrors.ustc.edu.cn"],
@@ -105,4 +105,3 @@ docker -v
105105# 新增 ningx/logs/${appName},创建应用 nginx 日志目录
106106docker-compose up -d --build
107107```
108-
You can’t perform that action at this time.
0 commit comments