docker - 运行之后,如何让他持续不关闭?(默认RUN一下就关闭了)

访问量: 955

参考:https://stackoverflow.com/questions/30209776/docker-container-will-automatically-stop-after-docker-run-d?rq=1

Dockerfile中:

ENTRYPOINT ["tail"]
CMD ["-f","/dev/null"]

或者:

docker exec -i -t <image> /bin/bash

订阅/RSS Feed

Subscribe