Initial commit

This commit is contained in:
dobiadi
2024-04-21 23:02:59 +02:00
commit 0428a21912
4 changed files with 99 additions and 0 deletions

19
Dockerfile Normal file
View File

@@ -0,0 +1,19 @@
ARG ALPINE_VERSION=latest
FROM alpine:$ALPINE_VERSION as builder
COPY Cargo.lock /usr/src/
COPY Cargo.toml /usr/src/
COPY src/ /usr/src/src/
WORKDIR /usr/src
RUN apk add --no-cache rustup build-base && \
rustup-init -qy --profile=minimal && \
source "$HOME/.cargo/env" && \
cargo build --release --target=x86_64-unknown-linux-musl
FROM alpine:$ALPINE_VERSION
COPY --from=builder /usr/src/target/x86_64-unknown-linux-musl/release/web-template /usr/bin/
CMD [ "/usr/bin/web-template" ]