haunter/Containerfile

24 lines
705 B
Plaintext
Raw Permalink Normal View History

# Use unstable for the moment, since this requires rustc >= 1.61
FROM docker.io/library/debian:unstable-slim as build
ARG BUILD_ARGS
ENV BUILD_ARGS=${BUILD_ARGS:---release}
RUN apt-get update
RUN apt-get install -y pkg-config build-essential
RUN apt-get install -y cargo
RUN apt-get install -y libssl-dev
RUN mkdir -p /src
WORKDIR /src
COPY ./src ./src
COPY ./Cargo.toml ./
COPY ./Cargo.lock ./
RUN cargo build ${BUILD_ARGS}
FROM docker.io/library/debian:unstable-slim as main
RUN apt-get update
RUN apt-get install -y libssl3
RUN mkdir -p /var/lib/haunter
RUN mkdir -p /etc/haunter
WORKDIR /var/lib/haunter
COPY --from=build /src/target/release/haunter /usr/local/bin/haunter
CMD /usr/local/bin/haunter