fix: container scratch image

This commit is contained in:
Jack Wills
2023-02-04 04:07:01 +00:00
parent 41b0858dee
commit 0bd317b7ce
+3 -3
View File
@@ -2,7 +2,7 @@
## Builder ## ## Builder ##
############# #############
FROM --platform=linux/amd64 rust:slim as builder FROM --platform=linux/amd64 rust:slim as BUILDER
ARG TARGETARCH ARG TARGETARCH
@@ -49,13 +49,13 @@ RUN cp /usr/src/oxker/target/$(cat /.platform)/release/oxker /
## Runtime ## ## 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 # Set an ENV that we're running in a container, so that the application can sleep for 250ms at start
ENV OXKER_RUNTIME=container ENV OXKER_RUNTIME=container
# Copy application binary from builder image # Copy application binary from builder image
COPY --from=builder /oxker /usr/local/bin COPY --from=BUILDER /oxker /usr/local/bin
# Run the application # Run the application
# this is used in the application itself, to stop itself show when running from a docker container, so DO NOT EDIT # this is used in the application itself, to stop itself show when running from a docker container, so DO NOT EDIT