From 0bd317b7ce6f9f42a614c488099b5fc7a14d91c7 Mon Sep 17 00:00:00 2001 From: Jack Wills <32690432+mrjackwills@users.noreply.github.com> Date: Sat, 4 Feb 2023 04:07:01 +0000 Subject: [PATCH] fix: container scratch image --- containerised/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/containerised/Dockerfile b/containerised/Dockerfile index 9d0fe10..257754f 100644 --- a/containerised/Dockerfile +++ b/containerised/Dockerfile @@ -2,7 +2,7 @@ ## Builder ## ############# -FROM --platform=linux/amd64 rust:slim as builder +FROM --platform=linux/amd64 rust:slim as BUILDER ARG TARGETARCH @@ -49,13 +49,13 @@ RUN cp /usr/src/oxker/target/$(cat /.platform)/release/oxker / ## Runtime ## ############# -FROM alpine:latest AS runtime +FROM scratch AS RUNTIME # Set an ENV that we're running in a container, so that the application can sleep for 250ms at start ENV OXKER_RUNTIME=container # Copy application binary from builder image -COPY --from=builder /oxker /usr/local/bin +COPY --from=BUILDER /oxker /usr/local/bin # Run the application # this is used in the application itself, to stop itself show when running from a docker container, so DO NOT EDIT