Only allow chown via sudo
This commit is contained in:
parent
4eb251ce41
commit
644dcc1641
@ -16,7 +16,7 @@ RUN mkdir /freqtrade \
|
||||
&& useradd -u 1000 -G sudo -U -m ftuser \
|
||||
&& chown ftuser:ftuser /freqtrade \
|
||||
# Allow sudoers
|
||||
&& echo "ftuser ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
|
||||
&& echo "ftuser ALL=(ALL) NOPASSWD: /bin/chown" >> /etc/sudoers
|
||||
|
||||
WORKDIR /freqtrade
|
||||
|
||||
|
@ -16,7 +16,7 @@ RUN mkdir /freqtrade \
|
||||
&& useradd -u 1000 -G sudo -U -m ftuser \
|
||||
&& chown ftuser:ftuser /freqtrade \
|
||||
# Allow sudoers
|
||||
&& echo "ftuser ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
|
||||
&& echo "ftuser ALL=(ALL) NOPASSWD: /bin/chown" >> /etc/sudoers
|
||||
|
||||
WORKDIR /freqtrade
|
||||
|
||||
|
@ -1,7 +1,10 @@
|
||||
FROM freqtradeorg/freqtrade:develop
|
||||
|
||||
RUN sudo apt-get update \
|
||||
&& sudo apt-get -y install git \
|
||||
&& sudo apt-get clean \
|
||||
# The below dependency - pyti - serves as an example. Please use whatever you need!
|
||||
&& pip install --user pyti
|
||||
# Switch user to root if you must install something from apt
|
||||
# Don't forget to switch the user back below!
|
||||
# USER root
|
||||
|
||||
# The below dependency - pyti - serves as an example. Please use whatever you need!
|
||||
RUN pip install --user pyti
|
||||
|
||||
# USER ftuser
|
||||
|
Loading…
Reference in New Issue
Block a user