Files
sshca/Containerfile
Dustin C. Hatch be4f5eb6d7 server: Add Containerfile
The SSHCA server is intended to be run in a Kubernetes container.
2023-11-08 21:29:00 -06:00

30 lines
620 B
Docker

FROM registry.fedoraproject.org/fedora:38 AS build
RUN --mount=type=cache,target=/var/cache \
dnf install -y \
--setopt install_weak_deps=0 \
cargo \
libvirt-devel \
rust \
&& :
COPY . /build
RUN cd /build && cargo build --release --bins && strip -s target/release/sshca
FROM registry.fedoraproject.org/fedora-minimal:38
RUN --mount=type=cache,target=/var/cache \
microdnf install -y \
--setopt install_weak_deps=0 \
tini \
libvirt-libs \
openssh-clients \
&& :
COPY --from=build /build/target/release/sshca /usr/local/bin/sshca
USER 298:298
ENTRYPOINT ["tini", "/usr/local/bin/sshca", "--"]