Update Dockerfile to use alpine:edge and replace wget with curl for healthcheck
This commit is contained in:
14
Dockerfile
14
Dockerfile
@@ -1,4 +1,4 @@
|
|||||||
FROM alpine:3.19 AS builder
|
FROM alpine:edge AS builder
|
||||||
|
|
||||||
RUN apk add --no-cache \
|
RUN apk add --no-cache \
|
||||||
gcc \
|
gcc \
|
||||||
@@ -11,14 +11,16 @@ RUN apk add --no-cache \
|
|||||||
nghttp2-dev \
|
nghttp2-dev \
|
||||||
zlib-dev \
|
zlib-dev \
|
||||||
git \
|
git \
|
||||||
ca-certificates
|
ca-certificates \
|
||||||
|
&& apk update \
|
||||||
|
&& apk upgrade --available
|
||||||
|
|
||||||
WORKDIR /build
|
WORKDIR /build
|
||||||
|
|
||||||
RUN git clone --depth 1 --branch main https://github.com/Azreyo/Carbon.git . && \
|
RUN git clone --depth 1 --branch main https://github.com/Azreyo/Carbon.git . && \
|
||||||
make clean && make release
|
make clean && make release
|
||||||
|
|
||||||
FROM alpine:3.19
|
FROM alpine:edge
|
||||||
|
|
||||||
RUN apk add --no-cache \
|
RUN apk add --no-cache \
|
||||||
libssl3 \
|
libssl3 \
|
||||||
@@ -26,7 +28,9 @@ RUN apk add --no-cache \
|
|||||||
nghttp2-libs \
|
nghttp2-libs \
|
||||||
zlib \
|
zlib \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
wget \
|
curl \
|
||||||
|
&& apk update \
|
||||||
|
&& apk upgrade --available \
|
||||||
&& rm -rf /tmp/* /var/cache/apk/*
|
&& rm -rf /tmp/* /var/cache/apk/*
|
||||||
|
|
||||||
RUN adduser -D -u 1000 -s /bin/sh carbon
|
RUN adduser -D -u 1000 -s /bin/sh carbon
|
||||||
@@ -61,4 +65,4 @@ EXPOSE 8080 8443
|
|||||||
ENTRYPOINT ["/app/entrypoint.sh"]
|
ENTRYPOINT ["/app/entrypoint.sh"]
|
||||||
|
|
||||||
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
|
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
|
||||||
CMD wget --no-verbose --tries=1 --spider http://localhost:${PORT:-8080}/ || exit 1
|
CMD curl -f -s http://localhost:${PORT:-8080}/ || exit 1
|
||||||
|
|||||||
Reference in New Issue
Block a user