通过如下的文件启动容器后 version: "3.8"services: test: image: python:3.10-slim container_name: test restart: always status一直处于Restarting >>> docker psCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES39694c66a560 python:3.10-slim "python3" 4 seconds ago Restarting (0) Less than a second ago test 且执行如下命令报错: >>> docker exec -i -t test bashError response from daemon: Container 39694c66a560e9b596ecb51bf678bbc0e5172329b2d9541aa57eda453d093623 is restarting, wait until the container is running 改成如下后解决 version: "3.8"services: test: image: python:3.10-slim container_name: test tty: true 参考:https://stackoverflow.com/a/63990209 下载地址: Nginx+Tomcat集群环境的实现 Docker容器不断重启问题解决 |