FROM registry.fedoraproject.org/fedora-minimal:39 AS build RUN --mount=type=cache,target=/var/cache \ microdnf install -y \ --setopt install_weak_deps=0 \ cargo \ git \ go \ && : RUN --mount=type=cache,target=/root/go \ go install kcl-lang.io/cli/cmd/kcl@v0.7 \ && /root/go/bin/kcl > /dev/null \ && cp /root/go/bin/* /usr/local/bin/ \ && : RUN --mount=type=cache,target=/root/.cargo \ cargo install --git https://git.pyrocufflink.net/dustin/tmpl.git \ && cp /root/.cargo/bin/tmpl /usr/local/bin \ && : FROM registry.fedoraproject.org/fedora-minimal:39 RUN --mount=type=cache,target=/var/cache \ --mount=type=bind,from=build,source=/,target=/build \ microdnf install -y \ --setopt install_weak_deps=0 \ age \ gcc \ git \ && ln -snf /host/etc/passwd /etc/passwd \ && ln -snf /host/etc/group /etc/group \ && cp -a /build/usr/local/bin/. /usr/local/bin \ && for cmd in \ systemctl \ systemd-sysusers \ ; do ln -s nsenter.sh /usr/local/bin/${cmd}; done \ && : COPY nsenter.sh /usr/local/bin/nsenter.sh COPY config.sh / CMD ["/config.sh"] ENV KCL_GO_DISABLE_ARTIFACT=on ENV KCL_PKG_PATH=/tmp ENV KCL_CACHE_PATH=/tmp LABEL license= \ vendor='Dustin C. Hatch' \