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.

22 lines
476 B
Docker

11 months ago
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 \
8 months ago
&& go build -o server .
11 months ago
FROM alpine:latest
WORKDIR /go/src/miniapp
COPY --from=0 /go/src/miniapp/server ./
COPY --from=0 /go/src/miniapp/resource ./resource/
8 months ago
COPY --from=0 /go/src/miniapp/config.yaml ./
11 months ago
EXPOSE 8888
8 months ago
ENTRYPOINT ./server -c config.yaml