baxin commited on
Commit
15b0fa7
·
1 Parent(s): 16a9021

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -2
Dockerfile CHANGED
@@ -8,7 +8,8 @@ ENV PYENV_ROOT $HOME/.pyenv
8
  ENV PATH $PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH
9
 
10
  # Initialize pyenv
11
- RUN echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
 
12
  RUN echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
13
  RUN echo 'eval "$(pyenv init --path)"' >> ~/.bashrc
14
  RUN echo 'eval "$(pyenv init -)"' >> ~/.bashrc
@@ -67,9 +68,10 @@ WORKDIR $HOME/app
67
  # Copy the current directory contents into the container at $HOME/app setting the owner to the user
68
  COPY --chown=user . $HOME/app
69
  # CMD ["pip" "install", "-r", "requirements"]
70
-
71
  RUN pip install -r requirements
72
 
 
73
  COPY --chown=user . $HOME/app
74
  # CMD ["python", "main.py"]
75
  ENTRYPOINT ["/bin/bash", "-c", "entrypoint.sh"]
 
8
  ENV PATH $PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH
9
 
10
  # Initialize pyenv
11
+ RUN echo 'export PYENV
12
+ _ROOT="$HOME/.pyenv"' >> ~/.bashrc
13
  RUN echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
14
  RUN echo 'eval "$(pyenv init --path)"' >> ~/.bashrc
15
  RUN echo 'eval "$(pyenv init -)"' >> ~/.bashrc
 
68
  # Copy the current directory contents into the container at $HOME/app setting the owner to the user
69
  COPY --chown=user . $HOME/app
70
  # CMD ["pip" "install", "-r", "requirements"]
71
+ USER root
72
  RUN pip install -r requirements
73
 
74
+ USER user
75
  COPY --chown=user . $HOME/app
76
  # CMD ["python", "main.py"]
77
  ENTRYPOINT ["/bin/bash", "-c", "entrypoint.sh"]