Files
sshca-cli/Containerfile
Dustin C. Hatch 9679c78419
Some checks are pending
dustin/sshca-cli/pipeline/pr-master Build started...
dustin/sshca-cli/pipeline/head This commit looks good
ci: Build container image
In addition to building an RPM package for regular Fedora machines, we
now build a container image containing a statically-linked `sshca-cli`
executable.
2024-01-18 09:43:36 -06:00

19 lines
354 B
Docker

FROM docker.io/library/rust:1.73-alpine AS build
COPY . /build
WORKDIR /build
RUN --mount=type=cache,target=/var/cache \
apk add --no-cache g++ \
&& :
RUN cargo build --release --no-default-features --features rustls \
&& strip target/release/sshca-cli
FROM scratch
COPY --from=build /build/target/release/sshca-cli /
ENTRYPOINT ["/sshca-cli"]