-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
23 lines (17 loc) · 723 Bytes
/
Dockerfile
File metadata and controls
23 lines (17 loc) · 723 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# syntax=docker/dockerfile
FROM rust:1.95-alpine3.21 AS builder
WORKDIR /project
COPY . /project/
# hadolint ignore=DL3018
RUN --mount=type=cache,target=/usr/local/cargo/git \
--mount=type=cache,target=/usr/local/cargo/registry \
--mount=type=cache,sharing=private,target=/project/target \
apk --no-cache add build-base musl-dev && \
cargo build --release && \
cp -v target/release/ruby-version-checker /ruby-version-checker
FROM scratch
COPY --from=builder /ruby-version-checker /ruby-version-checker
LABEL maintainer="Moritz Heiber <hello@heiber.im>"
LABEL org.opencontainers.image.source=https://github.com/moritzheiber/ruby-version-checker-rs
ENV RUST_LOG="info"
CMD ["/ruby-version-checker"]