FROM debian:latest # install runtime dependencies RUN apt-get update -y RUN apt-get install -y curl gcc unzip pkg-config libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libx11-dev libxmu-dev python3 libssl-dev xsel # install rustup-init ENV CARGO_HOME /usr ENV RUSTUP_HOME /usr ADD https://sh.rustup.rs /usr/bin/rustup-init RUN chmod 555 /usr/bin/rustup-init RUN /usr/bin/rustup-init -y # prepare to run as non-root RUN adduser --system --home=/home/rooster -u 1000 rooster-user WORKDIR /home/rooster-docker-test/data ENTRYPOINT ["/usr/bin/rooster"] # make files findable by non-root ADD . /home/rooster-docker-test/data RUN cargo install --all-features --debug --path /home/rooster-docker-test/data/rooster --root /usr # run as non-root USER rooster-user