JM-WechatMini/Dockerfile

23 lines
551 B
Docker
Raw Normal View History

2023-11-02 04:34:46 +08:00
FROM golang:alpine as builder
WORKDIR /go/src/miniapp
COPY . .
RUN go env -w GO111MODULE=on \
&& go env -w GOPROXY=https://goproxy.cn,direct \
&& go env -w CGO_ENABLED=0 \
&& go env \
&& go mod tidy \
2024-01-11 16:03:51 +08:00
&& go build -o server .
2023-11-02 04:34:46 +08:00
FROM alpine:latest
WORKDIR /go/src/miniapp
COPY --from=0 /go/src/miniapp/server ./
COPY --from=0 /go/src/miniapp/resource ./resource/
2024-03-21 21:08:45 +08:00
COPY --from=0 /go/src/miniapp/docker/config.docker.yaml ./docker/
COPY --from=0 /go/src/miniapp/docker ./
2023-11-02 04:34:46 +08:00
EXPOSE 8888
2024-03-21 21:08:45 +08:00
ENTRYPOINT ./server -c docker/config.docker.yaml