Files
harmony/Dockerfile
Jean-Gabriel Gill-Couture 45a1d480c4
All checks were successful
Run Check Script / check (push) Successful in 2m13s
Compile and package harmony_composer / package_harmony_composer (push) Successful in 8m9s
feat(composer): Add helm in harmony composer image
2026-07-04 19:18:46 -04:00

36 lines
987 B
Docker

FROM docker.io/rust:1.94 AS build
WORKDIR /app
COPY . .
RUN cargo build --release --bin harmony_composer
FROM docker.io/rust:1.94
WORKDIR /app
ARG HELM_VERSION=v3.15.4
RUN rustup target add x86_64-pc-windows-gnu
RUN rustup target add x86_64-unknown-linux-gnu
RUN rustup component add rustfmt
RUN rustup component add clippy
RUN apt update
# TODO: Consider adding more supported targets
# nodejs for checkout action, docker for building containers, mingw for cross-compiling for windows
# libvirt-dev for the kvm harmony module (virt crate links against libvirt at build time)
RUN apt install -y nodejs docker.io mingw-w64 libvirt-dev curl ca-certificates
RUN curl -fsSL "https://get.helm.sh/helm-${HELM_VERSION}-linux-amd64.tar.gz" \
| tar -xz -C /tmp \
&& mv /tmp/linux-amd64/helm /usr/local/bin/helm \
&& chmod +x /usr/local/bin/helm \
&& rm -rf /tmp/linux-amd64
COPY --from=build /app/target/release/harmony_composer .
ENTRYPOINT ["/app/harmony_composer"]