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.

23 lines
424 B
Docker

FROM golang:alpine as builder
WORKDIR /data
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 \
&& go build -o pychr .
FROM alpine:latest
WORKDIR /data
COPY --from=0 /data/pychr ./
COPY --from=0 /data/resource ./resource/
COPY --from=0 /data/config.yaml ./
EXPOSE 8888
ENTRYPOINT ./pychr -c config.yaml