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.
|
|
|
FROM 192.168.1.131:8888/library/golang:1.20.5 AS builder
|
|
|
|
|
|
|
|
COPY . /src
|
|
|
|
WORKDIR /src
|
|
|
|
|
|
|
|
RUN go mod tidy
|
|
|
|
RUN go build main.go
|
|
|
|
|
|
|
|
FROM 192.168.1.131:8888/library/alpine:3.13
|
|
|
|
RUN apk add make
|
|
|
|
RUN set -eux && sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories
|
|
|
|
RUN apk update && apk add tzdata
|
|
|
|
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
|
|
|
|
RUN echo "Asia/Shanghai" > /etc/timezone
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
COPY --from=builder /src/configs /app/configs
|
|
|
|
COPY --from=builder /src/main /app/main
|
|
|
|
ENTRYPOINT ["./main"]
|
|
|
|
|