Server only docker image
All checks were successful
/ cargo test (push) Successful in 20s

This commit is contained in:
Karcsesz 2024-04-01 16:53:23 +02:00
parent a38ab85320
commit 6cd503711f
2 changed files with 30 additions and 1 deletions

View file

@ -19,4 +19,9 @@ jobs:
with: with:
push: true push: true
tags: karcsesz/fingerlink:latest-nano tags: karcsesz/fingerlink:latest-nano
build-args: "editor=nano" build-args: "editor=nano"
- uses: docker/build-push-action@v5
with:
push: true
tags: karcsesz/fingerlink:latest-server
file: { context }/Dockerfile.serveonly

24
Dockerfile.serveonly Normal file
View file

@ -0,0 +1,24 @@
FROM rust:latest as builder
LABEL authors="karcsesz"
ARG target=x86_64-unknown-linux-musl
RUN apt update && apt install -y musl-tools musl-dev
RUN update-ca-certificates
RUN rustup target add $target
WORKDIR /fingerlink
COPY . .
RUN cargo build --target $target --release --no-default-features --features server
FROM scratch
ENV PATH="${PATH}:/fingerlink"
WORKDIR /fingerlink
COPY --from=builder /fingerlink/target/x86_64-unknown-linux-musl/release/fingerlink /fingerlink/fingerlink
ENTRYPOINT ["/fingerlink/fingerlink", "serve"]
CMD ["--help"]