Skip to content

Commit

Permalink
Merge pull request #36 from farribeiro/sudo
Browse files Browse the repository at this point in the history
Using sudo instead su
  • Loading branch information
farribeiro authored May 24, 2018
2 parents c58370a + db0059f commit 6bfa79f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,14 @@ RUN apt-get update \
firefox \
firefox-locale-pt \
xauth \
sudo \
--no-install-recommends \
&& groupadd -g 1000 -r ff \
&& useradd -u 1000 -r -g ff -G audio,video ff -d /home/ff \
&& chmod 744 /home/ff/startup.sh \
&& chown -R ff:ff /home/ff \
&& echo 'ff ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers \
&& echo 'Defaults !requiretty' >> /etc/sudoers \
&& echo root:wscef | chpasswd \
&& apt-get purge --auto-remove -y \
&& rm -rf /var/lib/apt/lists/*
Expand Down
6 changes: 4 additions & 2 deletions startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ fi
if [ ! -d ~/.mozilla ]
then
firefox -CreateProfile default \
&& su -c "apt update && apt -y upgrade && apt -y install /src/GBPCEFwr64.deb"
&& sudo "apt update" \
&& sudo "apt -y upgrade" \
&& sudo "apt -y install /src/GBPCEFwr64.deb"
else
su -c "/etc/init.d/warsaw start"
sudo "/etc/init.d/warsaw start"
fi

/usr/local/bin/warsaw/core \
Expand Down

0 comments on commit 6bfa79f

Please sign in to comment.