You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

build_docker.sh 270 B

1 week ago
12345678910111213141516
  1. if [[ $? -ne 0 ]]; then
  2. exit 1
  3. fi
  4. server=$1
  5. cd cmd/$server
  6. # 打包可执行文件
  7. CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o main
  8. pwd
  9. mv main ../../docker/
  10. cd ../../docker/
  11. pwd
  12. # 构建镜像
  13. docker build -t $1 .
  14. kind load docker-image $server --name kind