You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
paopao-ce/Dockerfile

27 lines
552 B

3 years ago
# build app
FROM golang AS build-env
3 years ago
ADD . /paopao-ce
3 years ago
3 years ago
WORKDIR /paopao-ce
3 years ago
RUN CGO_ENABLED=0 go build .
# safe image
FROM alpine
ENV TZ=Asia/Shanghai
RUN apk update && apk add --no-cache ca-certificates && update-ca-certificates
3 years ago
COPY --from=build-env /paopao-ce/paopao-ce /usr/bin/paopao-ce
3 years ago
COPY --from=build-env /paopao-ce/assets/comic.ttf /assets/comic.ttf
3 years ago
COPY --from=build-env /paopao-ce/configs /configs
3 years ago
EXPOSE 8000
3 years ago
CMD ["paopao-ce"]
3 years ago
# HEALTHCHECK
3 years ago
HEALTHCHECK --interval=5s --timeout=3s --retries=3 CMD ps -ef | grep paopao-ce || exit 1