除了 交互式的 container(interactive container)
也能建立长期运行的 container(daemonized container)
背景式的、没有互动式会话的 container 适合用来执行应用程序&服务
docker run --name daemon_eric -d ubuntu bash -c "while true; do echo hello 2021ironman ; sleep 1 ; done "
上述指令中使用了 docker run 中的 -d 参数,Docker 会将 container 放到後台执行
-c 下了一个命令 while 循环一直不断的跟 铁人赛 say hello hello .... and hello
执行完毕 docker 只会回传一个 container ID
检查一下 contaier 有没有活着 docker ps
看看 container 内部在干些啥儿
docker logs [OPTIONS] CONTAINER
若是在後面加上 -f 则能『即时更新』 『监控』docker log
docker logs --tail 10 daemon_eric 来看最後的十行 log
docker logs --tail 0 -f daemon_eric 来看最新的一则log 而不必全面概览
(请看动图)
以此为模版将需要的内容图片填进去 <!DOCTYPE html> <html>...
少林秘笈宝典 基本指令介绍 查看docker目前有哪些images可以使用 docker image...
此为番外,此篇选入番外的原因是 glob 并不是个工具,但是是个会常被各种工具采用的一种配置方式。...
《30天带你上完 Google Data Analytics Certificate 课程》系列将...
在 Day24 介绍 Web 前端渲染架构时,有提到 Stale While Revalidate...