circulartext commited on
Commit
0c91ad6
·
1 Parent(s): 23aa172

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -5
Dockerfile CHANGED
@@ -13,10 +13,10 @@ ENV USER_ID=$USER_ID
13
 
14
  # Check if the user already exists
15
  RUN if id "$USER_ID" >/dev/null 2>&1; then \
16
- echo "User with ID $USER_ID already exists."; \
17
- else \
18
- useradd -m -u "$USER_ID" user; \
19
- fi
20
 
21
  # Set appropriate permissions for the application directory
22
  RUN chown -R user:user /app && chmod -R 755 /app
@@ -44,10 +44,11 @@ COPY --from=packages /usr/sbin/gosu /usr/sbin/gosu
44
 
45
  # Set the entrypoint script as executable
46
  COPY entrypoint.sh /usr/local/bin/entrypoint.sh
47
- RUN chmod +x /usr/local/bin/entrypoint.sh
48
 
49
  # Define the entrypoint script to handle user creation and application startup
50
  ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
51
 
52
  # Default command to run if the user doesn't provide a command
53
  CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860", "--reload"]
 
 
13
 
14
  # Check if the user already exists
15
  RUN if id "$USER_ID" >/dev/null 2>&1; then \
16
+ echo "User with ID $USER_ID already exists."; \
17
+ else \
18
+ useradd -m -u "$USER_ID" user; \
19
+ fi
20
 
21
  # Set appropriate permissions for the application directory
22
  RUN chown -R user:user /app && chmod -R 755 /app
 
44
 
45
  # Set the entrypoint script as executable
46
  COPY entrypoint.sh /usr/local/bin/entrypoint.sh
47
+ RUN sudo chmod +x /usr/local/bin/entrypoint.sh
48
 
49
  # Define the entrypoint script to handle user creation and application startup
50
  ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
51
 
52
  # Default command to run if the user doesn't provide a command
53
  CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860", "--reload"]
54
+