circulartext commited on
Commit
f877332
·
1 Parent(s): 8d7f247

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -6
Dockerfile CHANGED
@@ -36,13 +36,14 @@ FROM base
36
  # Copy gosu from the packages image
37
  COPY --from=packages /usr/sbin/gosu /usr/sbin/gosu
38
 
39
- # Set the entrypoint script as executable
40
- COPY entrypoint.sh /usr/local/bin/entrypoint.sh
41
- RUN chmod +x /usr/local/bin/entrypoint.sh
 
 
42
 
43
- # Define the entrypoint script to handle user creation and application startup
44
- ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
45
 
46
  # Default command to run if the user doesn't provide a command
47
  CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860", "--reload"]
48
-
 
36
  # Copy gosu from the packages image
37
  COPY --from=packages /usr/sbin/gosu /usr/sbin/gosu
38
 
39
+ # Copy entrypoint.sh to /app
40
+ COPY entrypoint.sh /app/entrypoint.sh
41
+
42
+ # Change permissions using gosu
43
+ RUN gosu user chmod +x /app/entrypoint.sh
44
 
45
+ # Set the entrypoint script as executable
46
+ ENTRYPOINT ["/app/entrypoint.sh"]
47
 
48
  # Default command to run if the user doesn't provide a command
49
  CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860", "--reload"]