25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

17 lines
270 B

  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