拷贝下来例子代码 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