使用powshell管理docker 创建与发布 发表于 2018-04-13 | 分类于 docker , microservice | | 阅读次数: | 本文总阅读量 次 介绍使用powshell管理docker 创建与发布 步骤:1.执行脚本【dockercompose.ps1】,查看服务是否运行良好,如果良好,执行2步骤2.执行构建发布脚本dockerpush.ps1运行脚本dockercompose.ps1123456#卸载先前环境docker-compose down#先构造docker-compose build#再运行docker-compose up 构建发布脚本dockerpush.ps11234567891011121314151617181920212223242526272829303132docker-compose downdocker-compose build#docker-compose up#列出所有windcatcher用户名的docker镜像docker image ls windcatcher/*# #删除所有windcatcher用户名的docker镜像# docker rmi $(docker images windcatcher/* -q)#tag镜像user_service并推送,用户名为windcatcher,tag为v1docker tag user_service windcatcher/user_service:v1docker push windcatcher/user_service:v1# tag镜像product_service并推送,用户名为windcatcher,tag为v1docker tag product_service windcatcher/product_service:v1docker push windcatcher/product_service:v1#tag镜像identity_service并推送,用户名为windcatcher,tag为v1docker tag identity_service windcatcher/identity_service:v1docker push windcatcher/identity_service:v1#tag镜像ocelotgateway并推送,用户名为windcatcher,tag为v1docker tag ocelotgateway windcatcher/ocelotgateway:v1docker push windcatcher/ocelotgateway:v1#tag镜像simpleclient并推送,用户名为windcatcher,tag为v1docker tag simpleclient windcatcher/simpleclient:v1docker push windcatcher/simpleclient:v1 您的支持将鼓励我继续创作 打赏 微信支付