diff --git a/docker/Dockerfile.builder b/docker/Dockerfile.builder index 84d09ff..c2fb526 100644 --- a/docker/Dockerfile.builder +++ b/docker/Dockerfile.builder @@ -1,12 +1,7 @@ # We use a multi-stage build to end up with a very small final image FROM alpine:latest AS builder -ARG MODE -ARG RUN_TESTS - ENV PATH "$PATH:/root/.cargo/bin" -# Needed for proper compiling of openssl-dev -ENV RUSTFLAGS="-C target-feature=-crt-static" WORKDIR /usr/src/app diff --git a/docker/Dockerfile.rel b/docker/Dockerfile.rel index 4d40ef2..e872ab1 100644 --- a/docker/Dockerfile.rel +++ b/docker/Dockerfile.rel @@ -1,5 +1,8 @@ FROM chewingbever/fej-builder:latest AS builder +# Needed for proper compiling of openssl-dev +ENV RUSTFLAGS="-C target-feature=-crt-static" + # And then finally, build the project # Thank the lords that this article exists # https://users.rust-lang.org/t/sigsegv-with-program-linked-against-openssl-in-an-alpine-container/52172 @@ -14,9 +17,16 @@ RUN --mount=type=cache,target=/usr/src/app/target \ FROM alpine:latest # Install some dynamic libraries needed for everything to work -RUN apk update && apk add --no-cache openssl libgcc +RUN apk update && apk add --no-cache openssl libgcc curl # Copy binary over to final image COPY --from=builder /usr/local/bin/fej /usr/local/bin/fej +HEALTHCHECK \ + --interval=10s \ + --timeout=5s \ + --start-period=1s \ + --retries=3 \ + CMD curl -q localhost:8000 + CMD ["/usr/local/bin/fej"]