From 04a46b36bdc39e095418d0748480c53ade4d220b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pascal=20Eng=C3=A9libert?= <tuxmain@zettascript.org>
Date: Mon, 9 Sep 2019 21:15:08 +0000
Subject: [PATCH] Update Dockerfile

---
 Dockerfile | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index a34447c..1b2258a 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -7,7 +7,7 @@ LABEL description="To compile and package rust program for arch linux on x64 arc
 RUN pacman -Syu --noconfirm
 
 # install gcc
-RUN pacman -S --noconfirm gcc grep sudo
+RUN pacman -S --noconfirm gcc grep sudo git
    
 # install rustup
 RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
@@ -18,8 +18,11 @@ ENV PATH /root/.cargo/bin:$PATH
 # install cargo arch
 RUN cargo install --git https://github.com/ZettaScript/cargo-arch
 
-# create sudoer user (makepkg refuses to be run by root)
-RUN useradd --no-create-home --shell=/bin/false user && usermod -L user
-RUN echo "user ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
-RUN echo "root ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
-ENV USER user
\ No newline at end of file
+# create user
+RUN useradd --no-create-home --shell=/bin/false builduser && usermod -L builduser
+RUN echo "builduser ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
+RUN chown -R builduser /builds/nodes/rust/duniter-rs/bin/dunitrust-server/src
+
+# 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
-- 
GitLab