This commit is contained in:
parent
a38ab85320
commit
6cd503711f
2 changed files with 30 additions and 1 deletions
|
@ -20,3 +20,8 @@ jobs:
|
|||
push: true
|
||||
tags: karcsesz/fingerlink:latest-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
24
Dockerfile.serveonly
Normal 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"]
|
Loading…
Reference in a new issue