Skip to content

Commit d5dda03

Browse files
committed
Change final image to alpine
1 parent eed87c8 commit d5dda03

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
FROM rust:1.91-slim AS build
22
WORKDIR /build
33

4-
RUN useradd -u 65532 nonroot
5-
64
RUN rustup target add x86_64-unknown-linux-musl && \
75
apt-get update && \
86
apt-get install -y musl-tools musl-dev && \
@@ -28,11 +26,12 @@ RUN --mount=type=cache,target=/usr/local/cargo/registry <<EOF
2826
cargo build --release --locked --target x86_64-unknown-linux-musl
2927
EOF
3028

31-
FROM scratch
29+
FROM alpine:3.23
3230

33-
COPY --from=build /etc/passwd /etc/passwd
3431
COPY --from=build /build/target/x86_64-unknown-linux-musl/release/glazed glazed
3532

33+
RUN adduser -u 65532 -D -H nonroot
34+
3635
USER nonroot
3736

3837
ENTRYPOINT ["/glazed"]

0 commit comments

Comments
 (0)