You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
exhibition-main/DockerfileWindowsTest

42 lines
1.2 KiB
Plaintext

FROM golang:1.20-alpine AS builder
MAINTAINER 570956418@qq.com
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
#ADD ./fonchain-main/go.mod .
#ADD ./fonchain-main/go.sum .
#COPY ./utils ../utils
#RUN go env -w GO111MODULE=on
#RUN go env -w GOPROXY=https://goproxy.cn,direct
#RUN go mod download
#COPY ./fonchain-main .
#RUN go build -ldflags "-s -w" -o /app/mainServer ./cmd/app.go
COPY ./build/exhibition-main-server /app/exhibition-main-server
FROM 172.16.100.99:9006/fonchain-base
#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 ./data /app/data
ENV TZ Asia/Shanghai
#ENV DUBBO_GO_CONFIG_PATH ./conf/dubbogo.yaml
ENV MODE_ENV test
#RUN apk add --no-cache ffmpeg
WORKDIR /app
COPY --from=builder /app/exhibition-main-server .
EXPOSE 9040
CMD ["/app/exhibition-main-server"]