Compare commits

...

2 Commits

Author SHA1 Message Date
Fabian Schmidt
75dc0a6320 Modify alternative builder for alpine 2024-09-04 11:12:50 +02:00
Fabian Schmidt
30f5210ef5 Document alternative builder for scratch image 2024-09-04 11:07:10 +02:00
2 changed files with 31 additions and 2 deletions

View File

@ -36,7 +36,7 @@ ENTRYPOINT ["/small-rust"]
#RUN update-ca-certificates
#
## Create appuser
#ENV USER=myip
#ENV USER=small-rust
#ENV UID=10001
#
#RUN adduser \
@ -49,7 +49,7 @@ ENTRYPOINT ["/small-rust"]
# "${USER}"
#
#
#WORKDIR /myip
#WORKDIR /app
#
#COPY ./ .
#

View File

@ -45,3 +45,32 @@ COPY --from=builder /app/target/x86_64-unknown-linux-musl/release/small-rust ./
USER small-rust: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
#