Update Dockerfile
Browse files- Dockerfile +5 -5
Dockerfile
CHANGED
|
@@ -3,23 +3,23 @@ FROM python:3.10
|
|
| 3 |
RUN useradd -m -u 1000 user
|
| 4 |
|
| 5 |
# Switch to the "user" user
|
| 6 |
-
|
| 7 |
|
| 8 |
# Set home to the user's home directory
|
| 9 |
ENV HOME=/home/user \
|
| 10 |
PATH=/home/user/.local/bin:$PATH
|
| 11 |
-
|
| 12 |
# Set the working directory to the user's home directory
|
| 13 |
WORKDIR $HOME/app
|
| 14 |
|
|
|
|
| 15 |
# Try and run pip command after setting the user with `USER user` to avoid permission issues with Python
|
| 16 |
RUN pip install --no-cache-dir --upgrade pip
|
| 17 |
|
| 18 |
#RUN sudo apt-get install texlive-full poppler-utils
|
| 19 |
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
| 20 |
COPY --chown=user . $HOME/app
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
USER user
|
| 24 |
EXPOSE 7080
|
| 25 |
CMD ["fastapi", "run", "app.py", "--port", "7080"]
|
|
|
|
| 3 |
RUN useradd -m -u 1000 user
|
| 4 |
|
| 5 |
# Switch to the "user" user
|
| 6 |
+
|
| 7 |
|
| 8 |
# Set home to the user's home directory
|
| 9 |
ENV HOME=/home/user \
|
| 10 |
PATH=/home/user/.local/bin:$PATH
|
| 11 |
+
RUN xargs apt-get install < ./paquetes.txt -y
|
| 12 |
# Set the working directory to the user's home directory
|
| 13 |
WORKDIR $HOME/app
|
| 14 |
|
| 15 |
+
USER user
|
| 16 |
# Try and run pip command after setting the user with `USER user` to avoid permission issues with Python
|
| 17 |
RUN pip install --no-cache-dir --upgrade pip
|
| 18 |
|
| 19 |
#RUN sudo apt-get install texlive-full poppler-utils
|
| 20 |
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
| 21 |
COPY --chown=user . $HOME/app
|
| 22 |
+
|
| 23 |
+
|
|
|
|
| 24 |
EXPOSE 7080
|
| 25 |
CMD ["fastapi", "run", "app.py", "--port", "7080"]
|