Document alternative builder for scratch image
This commit is contained in:
parent
01e72652b8
commit
30f5210ef5
@ -45,3 +45,32 @@ COPY --from=builder /app/target/x86_64-unknown-linux-musl/release/small-rust ./
|
|||||||
USER small-rust:small-rust
|
USER small-rust:small-rust
|
||||||
|
|
||||||
CMD ["/app/small-rust"]
|
CMD ["/app/small-rust"]
|
||||||
|
|
||||||
|
####################################################################################################
|
||||||
|
## Alternatively use this builder (image size actually bigger)
|
||||||
|
####################################################################################################
|
||||||
|
#FROM rust:1-alpine3.19 AS builder
|
||||||
|
#
|
||||||
|
#RUN rustup update nightly; rustup default nightly;
|
||||||
|
#
|
||||||
|
## Create appuser
|
||||||
|
#ENV USER=small-rust
|
||||||
|
#ENV UID=10001
|
||||||
|
#
|
||||||
|
#RUN adduser \
|
||||||
|
# --disabled-password \
|
||||||
|
# --gecos "" \
|
||||||
|
# --home "/nonexistent" \
|
||||||
|
# --shell "/sbin/nologin" \
|
||||||
|
# --no-create-home \
|
||||||
|
# --uid "${UID}" \
|
||||||
|
# "${USER}"
|
||||||
|
#
|
||||||
|
#RUN apk add --no-cache musl-dev
|
||||||
|
#
|
||||||
|
#WORKDIR /app
|
||||||
|
#
|
||||||
|
#COPY ./ /app
|
||||||
|
#
|
||||||
|
#RUN cargo build --release
|
||||||
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user