2024-03-17 22:49:30 +01:00
|
|
|
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
|
|
|
|
|
2024-03-18 00:38:26 +01:00
|
|
|
FROM alpine:latest
|
|
|
|
|
|
|
|
ARG editor=vim
|
|
|
|
|
|
|
|
RUN apk add --no-cache $editor
|
|
|
|
ENV EDITOR=$editor
|
2024-03-18 00:55:14 +01:00
|
|
|
ENV PATH="${PATH}:/fingerlink"
|
2024-03-17 22:49:30 +01:00
|
|
|
WORKDIR /fingerlink
|
|
|
|
|
|
|
|
COPY --from=builder /fingerlink/target/x86_64-unknown-linux-musl/release/fingerlink /fingerlink/fingerlink
|
|
|
|
|
|
|
|
ENTRYPOINT ["/fingerlink/fingerlink", "serve"]
|
|
|
|
CMD ["--help"]
|