From 6c607326073f60356517b2e8b0a33a488b17d5c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pascal=20Eng=C3=A9libert?= <tuxmain@zettascript.org> Date: Mon, 9 Sep 2019 18:08:26 +0000 Subject: [PATCH] Update Dockerfile --- Dockerfile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 22c6545..9332f00 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,13 +3,11 @@ MAINTAINER elois <elois@ifee.fr> LABEL version="1.37" LABEL description="To compile and package rust program for arch linux on x64 architecture" -# TODO install needed dependencies - # update & upgrade RUN pacman -Syu --noconfirm # install gcc -RUN pacman -S --noconfirm gcc +RUN pacman -S --noconfirm gcc grep sudo # install rustup RUN curl https://sh.rustup.rs -sSf | sh -s -- -y @@ -19,3 +17,9 @@ 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 -- GitLab