作者 yangfu

base image

FROM golang:1.19-alpine as builder
# Define the project name | 定义项目名称
ARG PROJECT=core
WORKDIR /build
COPY . .
RUN go env -w GO111MODULE=on \
&& go env -w GOPROXY=https://goproxy.cn,direct \
&& go env -w CGO_ENABLED=0 \
&& go env \
&& go mod tidy \
&& cd cmd/chart-server/api \
&& go build -ldflags="-s -w" -o /build/api/${PROJECT} ${PROJECT}.go
\ No newline at end of file
... ...
... ... @@ -20,4 +20,13 @@ goctl api plugin -plugin goctl-swagger="swagger -filename core.json" -api .\doc\
```
docker build -f Dockerfile -t tiptok/sumifcc-bchart:1.0.0 .
```
## 基础镜像
```
docker build -f DockerfileBase -t tiptok/sumifcc-bchart-base:1.0.0 .
docker save -o sumifcc-bchart-base.tar tiptok/sumifcc-bchart-base:1.0.0
docker load --input sumifcc-bchart-base.tar
docker tag
```
\ No newline at end of file
... ...