diff --git a/Dockerfile b/Dockerfile index c47f5f3..f3aa6f9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,10 +5,14 @@ ADD . . RUN apt update && apt install -y musl-tools RUN rustup target add x86_64-unknown-linux-musl RUN cargo build --release --target x86_64-unknown-linux-musl -RUN strip /app/target/release/macnickenson +RUN find /app/target -name macnickenson +RUN strip /app/target/x86_64-unknown-linux-musl/release/macnickenson # --- -FROM debian:buster-slim -COPY --from=builder /app/target/release/macnickenson /opt/macnickenson -CMD /opt/macnickenson +FROM scratch +WORKDIR /app/static +WORKDIR /app +COPY --from=builder /app/target/x86_64-unknown-linux-musl/release/macnickenson /app/macnickenson +USER 1000 +CMD ["/app/macnickenson"]