Fingerlink/Dockerfile
Karcsesz 2e86deb862
Some checks are pending
/ docker build (push) Blocked by required conditions
/ cargo test (push) Successful in 22s
Enable very rudimentary CI/CD (#1)
Reviewed-on: #1
Co-authored-by: Karcsesz <git@karcsesz.hu>
Co-committed-by: Karcsesz <git@karcsesz.hu>
2024-03-18 01:54:16 +01:00

28 lines
No EOL
586 B
Docker

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
FROM alpine:latest
ARG editor=vim
RUN apk add --no-cache $editor
ENV EDITOR=$editor
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"]