mabel/Dockerfile
Hamcha 07e4617710
Some checks reported errors
continuous-integration/drone/push Build was killed
add dockerfile and CI
2023-07-05 15:14:01 +02:00

34 lines
No EOL
512 B
Docker

FROM rust:slim AS builder
RUN update-ca-certificates
ENV USER=mabel
ENV UID=10001
RUN adduser \
--disabled-password \
--gecos "" \
--home "/nonexistent" \
--shell "/sbin/nologin" \
--no-create-home \
--uid "${UID}" \
"${USER}"
WORKDIR /mabel
COPY ./ .
RUN cargo build --release
FROM gcr.io/distroless/cc
COPY --from=builder /etc/passwd /etc/passwd
COPY --from=builder /etc/group /etc/group
WORKDIR /mabel
COPY --from=builder /mabel/target/release/mabel ./
USER mabel:mabel
CMD ["/mabel/mabel"]