sigyllly commited on
Commit
4e7102d
·
verified ·
1 Parent(s): a380f43

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -10
Dockerfile CHANGED
@@ -14,24 +14,19 @@ RUN apt-get update && apt-get install -y \
14
  && apt-get install -y python3-pip \
15
  && rm -rf /var/lib/apt/lists/*
16
 
17
- # Create a writable directory for .NET
18
- RUN mkdir -p /home/appuser/.dotnet && chmod -R 777 /home/appuser/.dotnet
19
-
20
- # Create uploads directory
21
- RUN mkdir -p /app/uploads
22
-
23
- # Create a non-root user and switch to it
24
  RUN useradd -ms /bin/bash appuser
25
  USER appuser
26
 
27
- # Set permissions for the working directory
28
- RUN chmod -R 777 /app
 
29
 
30
  # Set the DOTNET_HOME environment variable
31
  ENV DOTNET_HOME="/home/appuser/.dotnet"
32
  ENV PATH="${PATH}:${DOTNET_HOME}"
33
 
34
- # Copy the requirements file
35
  COPY --chown=appuser:appuser ./requirements.txt /app/requirements.txt
36
 
37
  # Install Python dependencies
 
14
  && apt-get install -y python3-pip \
15
  && rm -rf /var/lib/apt/lists/*
16
 
17
+ # Create a non-root user and set it as the user for the rest of the image
 
 
 
 
 
 
18
  RUN useradd -ms /bin/bash appuser
19
  USER appuser
20
 
21
+ # Create necessary directories and set permissions
22
+ RUN mkdir -p /app/uploads /home/appuser/.dotnet && \
23
+ chmod -R 777 /app/uploads /home/appuser/.dotnet
24
 
25
  # Set the DOTNET_HOME environment variable
26
  ENV DOTNET_HOME="/home/appuser/.dotnet"
27
  ENV PATH="${PATH}:${DOTNET_HOME}"
28
 
29
+ # Copy the requirements file with the right permissions
30
  COPY --chown=appuser:appuser ./requirements.txt /app/requirements.txt
31
 
32
  # Install Python dependencies