美文网首页
以容器的方式打印hello world,并保持容器长久运行

以容器的方式打印hello world,并保持容器长久运行

作者: 前端小白a | 来源:发表于2018-08-27 11:49 被阅读0次

1、创建Dockerfile文件

  cd /root

  mkdir xulanlan

  cd xulanlan

  touch Dockerfile

2、在NotePad++中连接该dockerfile

3、cd xulanlan

  docker build -t bb .  (在上下文中运行)

基于dockerfile 创建镜像bb

  docker images

  docker run -dit bb

  docker logs id

相关文章

网友评论

      本文标题:以容器的方式打印hello world,并保持容器长久运行

      本文链接:https://www.haomeiwen.com/subject/xopiiftx.html