haj 0.3.7

the beautiful, cross-distro package manager and tui.
# builder
FROM archlinux:base-devel AS builder

RUN pacman -Syu --noconfirm rust cargo clang pkgconf

WORKDIR /usr/src/haj

COPY . .

RUN cargo install display3d --version 0.2.3 --locked \
 && cargo build --release --locked

# runtime
FROM archlinux:base

RUN pacman -Syu --noconfirm pacman sudo ca-certificates git \
 && pacman -Scc --noconfirm \
 && useradd -m -s /bin/bash haj \
 && echo "haj ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/haj \
 && chmod 0440 /etc/sudoers.d/haj

WORKDIR /app

COPY --from=builder /usr/src/haj/target/release/haj /usr/local/bin/haj
COPY --from=builder /root/.cargo/bin/display3d /usr/local/bin/display3d

USER haj
ENTRYPOINT ["haj"]
CMD ["--help"]