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 \
|
&& useradd -u 1000 -G sudo -U -m ftuser \
|
||||||
&& chown ftuser:ftuser /freqtrade \
|
&& chown ftuser:ftuser /freqtrade \
|
||||||
# Allow sudoers
|
# Allow sudoers
|
||||||
&& echo "ftuser ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
|
&& echo "ftuser ALL=(ALL) NOPASSWD: /bin/chown" >> /etc/sudoers
|
||||||
|
|
||||||
WORKDIR /freqtrade
|
WORKDIR /freqtrade
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ RUN mkdir /freqtrade \
|
|||||||
&& useradd -u 1000 -G sudo -U -m ftuser \
|
&& useradd -u 1000 -G sudo -U -m ftuser \
|
||||||
&& chown ftuser:ftuser /freqtrade \
|
&& chown ftuser:ftuser /freqtrade \
|
||||||
# Allow sudoers
|
# Allow sudoers
|
||||||
&& echo "ftuser ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
|
&& echo "ftuser ALL=(ALL) NOPASSWD: /bin/chown" >> /etc/sudoers
|
||||||
|
|
||||||
WORKDIR /freqtrade
|
WORKDIR /freqtrade
|
||||||
|
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
FROM freqtradeorg/freqtrade:develop
|
FROM freqtradeorg/freqtrade:develop
|
||||||
|
|
||||||
RUN sudo apt-get update \
|
# Switch user to root if you must install something from apt
|
||||||
&& sudo apt-get -y install git \
|
# Don't forget to switch the user back below!
|
||||||
&& sudo apt-get clean \
|
# USER root
|
||||||
# The below dependency - pyti - serves as an example. Please use whatever you need!
|
|
||||||
&& pip install --user pyti
|
# 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