From b6b9fc55d0833f621f904a5a3e272c46ad8a715b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pascal=20Eng=C3=A9libert?= <tuxmain@zettascript.org>
Date: Tue, 10 Sep 2019 17:48:44 +0000
Subject: [PATCH] Update Dockerfile

---
 Dockerfile | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index 80d4c83..03c5049 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
-- 
GitLab