build: bump alpine version, add healthcheck

Signed-off-by: rare-magma <rare-magma@posteo.eu>
This commit is contained in:
rare-magma 2024-07-07 19:41:39 +02:00
parent 33c93fc0b4
commit 6b83e94d3a
No known key found for this signature in database

View file

@ -1,10 +1,13 @@
FROM golang:1.18 as builder
WORKDIR /gossaSrc
COPY . /gossaSrc
RUN cd /gossaSrc && make
RUN make
FROM alpine:3.15
FROM docker.io/library/alpine:3.20
ENV UID="1000" GID="1000" HOST="0.0.0.0" PORT="8001" PREFIX="/" FOLLOW_SYMLINKS="false" SKIP_HIDDEN_FILES="true" DATADIR="/shared" READONLY="false" VERB="false"
RUN apk add --no-cache su-exec
COPY ./support/entrypoint.sh /entrypoint.sh
COPY --from=builder /gossaSrc/gossa /gossa
USER nobody
ENTRYPOINT "/entrypoint.sh"
HEALTHCHECK --timeout=5s --start-period=5s --retries=3 CMD wget --no-verbose --tries=1 --spider 127.0.0.1:8001 || exit 1