sunyue
1 year ago
1 changed files with 19 additions and 0 deletions
@ -0,0 +1,19 @@ |
|||||
|
FROM registry.cn-hangzhou.aliyuncs.com/fs-devops/golang:2.22-06-22 |
||||
|
|
||||
|
WORKDIR /app/ |
||||
|
COPY . . |
||||
|
RUN unset GOPROXY |
||||
|
RUN go env -w GOPROXY=https://goproxy.cn |
||||
|
RUN go env -w GO111MODULE=on |
||||
|
RUN CGO_ENABLED=0 go build -ldflags "-extldflags -static " -tags netgo -a -v -o missionBoard main.go |
||||
|
|
||||
|
|
||||
|
FROM repository.anxinyun.cn/devops/alpine:3-tz-hw |
||||
|
RUN apk update && apk add tzdata |
||||
|
WORKDIR /usr/local/bin |
||||
|
COPY --from=0 /app/conf.ini /usr/local/bin |
||||
|
COPY --from=0 /app/missionBoard /usr/local/bin |
||||
|
EXPOSE 8080 |
||||
|
RUN chmod +x /usr/local/bin/missionBoard |
||||
|
|
||||
|
CMD ["missionBoard"] |
Loading…
Reference in new issue