diff --git a/Dockerfile b/Dockerfile index 80d4c83eca10b7636f42cb3391b2dcb248fed141..03c5049baf7ab44ce5550aed7319c26d3a6a89e9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,20 +8,20 @@ RUN pacman -Syu --noconfirm # install gcc RUN pacman -S --noconfirm gcc grep sudo git - + +# create user +RUN useradd builduser +RUN echo "builduser ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers + +USER builduser + # install rustup RUN curl https://sh.rustup.rs -sSf | sh -s -- -y +RUN rustup install stable +RUN rustup default stable # rustup directory -ENV PATH /root/.cargo/bin:$PATH - -# install cargo arch -RUN cargo install --git https://github.com/ZettaScript/cargo-arch - -# create user -RUN useradd --no-create-home --shell=/bin/false builduser && usermod -L builduser -RUN echo "builduser ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers +ENV PATH /home/builduser/.cargo/bin:$PATH -# place bins into accessible places -RUN cp /root/.cargo/bin/cargo /usr/bin -RUN cp /root/.cargo/bin/cargo-arch /usr/bin \ No newline at end of file +# install cargo-arch +RUN cargo install --git https://github.com/ZettaScript/cargo-arch \ No newline at end of file