上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 36 下一页
摘要: 问题:用docker部署了源码安装的php,想试试让外部访问9000端口,发现无法访问,在宿主机telnet docker的ip 9000 也是无法访问的 解决办法:修改php的php-fpm.conf 原来listen = 127.0.0.1:9000 修改listen = 0.0.0.0:900 阅读全文
posted @ 2022-09-19 21:37 lucky_tomato 阅读(391) 评论(0) 推荐(0) 编辑
摘要: 需要在启动php容器中,指定跟nginx启动一样的html目录 阅读全文
posted @ 2022-09-19 21:32 lucky_tomato 阅读(582) 评论(0) 推荐(0) 编辑
摘要: 在docker反复build后,会存留很多none镜像,下面命令一键删除所有none镜像 (docker 清理) docker rmi `docker images | grep '<none>' | awk '{print $3}'` docker rmi `docker images -q -f 阅读全文
posted @ 2022-09-19 21:26 lucky_tomato 阅读(398) 评论(0) 推荐(0) 编辑
摘要: 在Docker容器退出时,默认容器内部的文件系统仍然被保留,以方便调试并保留用户数据。因此,可以通过--rm命令,让容器在退出时,自动清除挂载的卷,以便清除数据:另外,当容器退出时,通过 docker ps是看不到,需要携带-a参数:docker ps -a 如果此时携带--rm,即使-a参数,也看 阅读全文
posted @ 2022-09-19 21:24 lucky_tomato 阅读(2048) 评论(0) 推荐(0) 编辑
摘要: Docker基本上都采用 UTC 时间,默认时区为零时区。 在 Linux 系统中,控制时区和时间的主要是两个地方: /etc/timezone 主要代表当前时区设置,一般链接指向/usr/share/zoneinfo目录下的具体时区。 /etc/localtime 主要代表当前时区设置下的本地时间 阅读全文
posted @ 2022-09-19 21:18 lucky_tomato 阅读(1787) 评论(0) 推荐(0) 编辑
摘要: 1.docker ps -a 查看容器进程 CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES c5fe8083e7e6 centos_nginx:v1 "/bin/sh -c '/bin/sh…" 10 seconds ago Exited 阅读全文
posted @ 2022-09-19 21:10 lucky_tomato 阅读(2511) 评论(0) 推荐(1) 编辑
摘要: 问题:启动后直接退出 command: "/usr/bin/supervisord -c /etc/supervisord.conf" 解决方法: 将 supervisor 配置的 nodaemon=false 修改为 nodaemon=true,使 supervisor 以前台的方式运行来维护容器 阅读全文
posted @ 2022-09-19 21:03 lucky_tomato 阅读(233) 评论(0) 推荐(0) 编辑
摘要: stat_info = os.stat('host.txt') uid = stat_info.st_uid gid = stat_info.st_gid user = pwd.getpwuid(uid)[0] group = grp.getgrgid(gid)[0] print(user,grou 阅读全文
posted @ 2022-09-19 20:54 lucky_tomato 阅读(639) 评论(0) 推荐(0) 编辑
摘要: import os,time filePath='test.txt' # 获取文件创建时间戳 print(os.path.getctime(filePath)) # 获取文件的修改时间戳 print(os.path.getmtime(filePath)) # 获取文件的访问时间戳 print(os. 阅读全文
posted @ 2022-09-19 20:44 lucky_tomato 阅读(347) 评论(0) 推荐(0) 编辑
摘要: YYYYMMDD T HHMMSS Z(或者时区标识)。 T表示分隔符,Z表示的是UTC。(相差北京时间8小时) 2020-01-13T16:00:00.000Z,对应的北京时间:2020-01-14 00:00:00 阅读全文
posted @ 2022-09-19 20:36 lucky_tomato 阅读(1406) 评论(0) 推荐(0) 编辑
上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 36 下一页