• 3
  • 新人请关照

将shell脚本改成bat脚本

因为需要在windows下使用,所以试着把shel改成bat,对着 http://www.yolinux.com/TUTORI... 这个网站上改了一下报错不断,所以来请教下~

#!/usr/bin/env bash
set -ex

git pull

version=$1
echo "version: $version"

export GOPATH=/Users/neo/Desktop/houseserver/gohouse:/Users/Desktop/server:$GOPATH
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o house ./src/house/main.go

docker build -t outsource/house:test -f ./docker/Dockerfile-test .


# docker tag outsource/house:latest 127.0.0.1:5000/outsource/house:latest
docker tag outsource/house:test 127.0.0.1:5000/outsource/house:test

docker push 127.0.0.1:5000/outsource/house:test
# docker push 127.0.0.1:5000/outsource/house:latest

#docker rmi 127.0.0.1:5000/vcloud/panoon:latest
#docker rmi 127.0.0.1:5000/vcloud/panoon:$version
docker rmi $(docker images -f "dangling=true" -q)
docker images
阅读 1.2k
评论
    1 个回答
    • 3
    • 新人请关照

    已经解决。

      撰写回答

      登录后参与交流、获取后续更新提醒