34 lines
925 B
Plaintext
34 lines
925 B
Plaintext
|
FROM golang:alpine AS builder
|
||
|
|
||
|
LABEL stage=gobuilder
|
||
|
ENV DUBBO_GO_CONFIG_PATH ./conf/dubbogo.yaml
|
||
|
ENV CGO_ENABLED 0
|
||
|
ENV GOOS linux
|
||
|
ENV GOPROXY https://goproxy.cn,direct
|
||
|
#RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
|
||
|
#RUN apk update --no-cache && apk add --no-cache tzdata
|
||
|
|
||
|
WORKDIR /build
|
||
|
#COPY ./utils ../utils
|
||
|
#ADD ./fonchain-artshow/go.mod .
|
||
|
#ADD ./fonchain-artshow/go.sum .
|
||
|
#RUN go mod download
|
||
|
#COPY ./fonchain-artshow .
|
||
|
|
||
|
#RUN go build -ldflags "-s -w" -o /app/artshowServer ./cmd/app.go
|
||
|
COPY ./build/artShowServerProd /app/artshowServer
|
||
|
|
||
|
FROM alpine
|
||
|
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
|
||
|
RUN apk update --no-cache
|
||
|
RUN apk add --no-cache ca-certificates
|
||
|
RUN apk add --no-cache tzdata
|
||
|
COPY ./conf /app/conf
|
||
|
|
||
|
ENV TZ Asia/Shanghai
|
||
|
#ENV MODE_ENV test
|
||
|
WORKDIR /app
|
||
|
COPY --from=builder /app/artshowServer .
|
||
|
#EXPOSE 9022
|
||
|
CMD ["/app/artshowServer"]
|