1
0
forked from MTSR/mapserver

add healthcheck to docker image

This commit is contained in:
BuckarooBanzay 2020-04-14 13:43:32 +02:00
parent 9d610681d0
commit 6633dfacdb

View File

@ -9,9 +9,12 @@ RUN cd /server &&\
make test jshint all make test jshint all
FROM alpine:3.11.5 FROM alpine:3.11.5
RUN apk --no-cache add ca-certificates RUN apk --no-cache add ca-certificates curl
WORKDIR /app WORKDIR /app
COPY --from=builder /server/output/mapserver-linux-x86_64 /bin/mapserver COPY --from=builder /server/output/mapserver-linux-x86_64 /bin/mapserver
HEALTHCHECK --interval=15s --timeout=3s \
CMD curl -f http://localhost:8080/ || exit 1
EXPOSE 8080 EXPOSE 8080
CMD ["/bin/mapserver"] CMD ["/bin/mapserver"]