ThomasBlumet commited on
Commit
6c7c754
·
1 Parent(s): 12476bc

update again the docker image

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -15
Dockerfile CHANGED
@@ -1,29 +1,20 @@
1
  # For more information, please refer to https://aka.ms/vscode-docker-python
2
  FROM python:3.9-slim
3
 
4
- # Keeps Python from generating .pyc files in the container
5
- ENV PYTHONDONTWRITEBYTECODE=1
 
6
 
7
- # Turns off buffering for easier container logging
8
- ENV PYTHONUNBUFFERED=1
9
  # Where we'll copy the code
10
  WORKDIR /code
11
 
12
  # Install pip requirements
13
- COPY requirements.txt /code/requirements.txt
14
- RUN python -m pip install --no-cache-dir --upgrade -r /code/requirements.txt
15
 
16
- # Creates a non-root user with an explicit UID and adds permission to access the /code folder
17
- # For more info, please refer to https://aka.ms/vscode-docker-python-configure-containers
18
- RUN useradd -m -u 1000 appuser && chown -R appuser /code
19
  USER appuser
20
 
21
- ENV HOME=/home/appuser
22
- ENV PATH=/home/appuser/.local/bin:$PATH
23
-
24
- WORKDIR $HOME/app
25
-
26
- COPY --chown=appuser . $HOME/app
27
 
28
  # During debugging, this entry point will be overridden. For more information, please refer to https://aka.ms/vscode-docker-python-debug
29
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
  # For more information, please refer to https://aka.ms/vscode-docker-python
2
  FROM python:3.9-slim
3
 
4
+ # Creates a non-root user with an explicit UID and adds permission to access the /code folder
5
+ # For more info, please refer to https://aka.ms/vscode-docker-python-configure-containers
6
+ RUN useradd -m -u 1000 appuser && chown -R appuser /code
7
 
 
 
8
  # Where we'll copy the code
9
  WORKDIR /code
10
 
11
  # Install pip requirements
12
+ COPY ./requirements.txt /code/requirements.txt
13
+ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
14
 
 
 
 
15
  USER appuser
16
 
17
+ COPY --chown=appuser ./ /code
 
 
 
 
 
18
 
19
  # During debugging, this entry point will be overridden. For more information, please refer to https://aka.ms/vscode-docker-python-debug
20
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]