docker推送镜像到dockerhub上

拷贝下来例子代码
git clone https://github.com/dockersamples/node-bulletin-board
cd node-bulletin-board/bulletin-board-app

构建镜像
docker build --tag bulletinboard:1.0 .

启动项目
docker run --publish 8000:8080 --detach --name bb bulletinboard:1.0

查看项目
localhost:8000(ip按情况定)

构造新的镜像

docker tag bulletinboard:1.0 <Your Docker ID>/bulletinboard:1.0

在这里插入图片描述
推送到dockerhub

docker push chaogaoxiaojidefantong/bulletinboard:1.0

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/chaogaoxiaojifantong/article/details/108964462