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.
 
 
 
 
 

19 lines
560 B

FROM registry.cn-hangzhou.aliyuncs.com/fs-devops/golang:2.22-06-22
WORKDIR /app/
COPY gowork/ .
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"]