36 lines
970 B
Plaintext
36 lines
970 B
Plaintext
FROM golang:alpine AS builder
|
|
|
|
LABEL stage=gobuilder
|
|
#ENV DUBBO_GO_CONFIG_PATH ./conf/dubbogo.yaml
|
|
#ENV MODE_ENV test
|
|
ENV TZ Asia/Shanghai
|
|
ENV CGO_ENABLED 0
|
|
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-artist/go.mod .
|
|
#ADD ./fonchain-artist/go.sum .
|
|
#RUN go mod download
|
|
#COPY ./fonchain-artist .
|
|
#
|
|
#RUN go build -ldflags "-s -w" -o /app/artistServer ./cmd/app.go
|
|
|
|
COPY ./build/artistinfo-dev /app/artistinfo-dev
|
|
|
|
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
|
|
COPY ./conf/test /conf
|
|
ENV TZ Asia/Shanghai
|
|
ENV MODE_ENV test
|
|
WORKDIR /app
|
|
COPY --from=builder /app/artistinfo-dev .
|
|
EXPOSE 20050
|
|
CMD ["/app/artistinfo-dev"]
|