Docker使用2-Update the application

2023-12-18 05:49:16

写在前面

主题是Update the application,这里是链接

更新项目

承接上个文章,这个文章主要是学习项目内容更新后重新构建image。

  1. 编辑上个项目的src/static/js/app.js文件,将第56行注释,添加下面的代码
<p className="text-center">You have no todo items yet! Add one above!</p>
  1. 重新生成镜像
docker build -t getting-started .
  1. 停止并移除之前运行的容器,container-id可以通过docker ps获得
docker rm -f <the-container-id>
  1. 生成并运行容器
docker run -dp 127.0.0.1:3000:3000 getting-started

文章来源:https://blog.csdn.net/qq_45382931/article/details/135052592
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。