Przeglądaj źródła

:bug: use root user inside container

Jeremy Zheng 8 miesięcy temu
rodzic
commit
51aecfd525
1 zmienionych plików z 6 dodań i 5 usunięć
  1. 6 5
      ai-translate/docker/Dockerfile

+ 6 - 5
ai-translate/docker/Dockerfile

@@ -20,16 +20,17 @@ RUN locale-gen
 RUN update-locale LANG=en_US.UTF-8
 RUN update-alternatives --set editor /usr/bin/vim.basic
 
-RUN useradd -s /bin/bash -m deploy
-RUN passwd -l deploy
-RUN echo 'deploy ALL=(ALL:ALL) NOPASSWD: ALL' > /etc/sudoers.d/101-deploy
-USER deploy
+# RUN useradd -s /bin/bash -m deploy
+# RUN passwd -l deploy
+# RUN echo 'deploy ALL=(ALL:ALL) NOPASSWD: ALL' > /etc/sudoers.d/101-deploy
+# USER deploy
+# ADD --chown=deploy https://bootstrap.pypa.io/get-pip.py /opt/
 
 RUN python${PYTHON_VERSION} -m venv $HOME/python3
 RUN echo 'source $HOME/python3/bin/activate' >> $HOME/.bashrc
 
 # https://pip.pypa.io/en/stable/installation/#get-pip-py
-ADD --chown=deploy https://bootstrap.pypa.io/get-pip.py /opt/
+ADD https://bootstrap.pypa.io/get-pip.py /opt/
 RUN bash -c ". $HOME/python3/bin/activate && python3 /opt/get-pip.py"
 RUN bash -c ". $HOME/python3/bin/activate && pip install pika requests redis[hiredis] openai"