mirror of https://github.com/rocboss/paopao-ce
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.
27 lines
538 B
27 lines
538 B
# build app
|
|
FROM golang AS build-env
|
|
|
|
ADD . /paopao-ce
|
|
|
|
WORKDIR /paopao-ce
|
|
|
|
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
|
|
|
|
COPY --from=build-env /paopao-ce/paopao-ce /usr/bin/paopao-ce
|
|
COPY --from=build-env /paopao-ce/comic.ttf /comic.ttf
|
|
COPY --from=build-env /paopao-ce/configs /configs
|
|
|
|
EXPOSE 8000
|
|
|
|
CMD ["paopao-ce"]
|
|
|
|
# HEALTHCHECK
|
|
HEALTHCHECK --interval=5s --timeout=3s --retries=3 CMD ps -ef | grep paopao-ce || exit 1
|