zyxciss commited on
Commit
266c1aa
·
verified ·
1 Parent(s): c346446

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -9
Dockerfile CHANGED
@@ -2,20 +2,18 @@ FROM ghcr.io/remsky/kokoro-fastapi-cpu:v0.2.0post3
2
 
3
  # Switch to root so we can install packages
4
  USER root
5
-
6
  RUN apt-get update && apt-get install -y socat && rm -rf /var/lib/apt/lists/*
7
 
8
- # Optionally, switch back to the original non-root user if needed.
9
- # Replace "appuser" with the appropriate username if known.
10
- # USER appuser
11
-
12
- # Set environment variables and expose the port
13
  ENV PORT=8880
 
 
14
  EXPOSE ${PORT}
15
 
16
- # Copy the startup script that forwards the dynamic port to port 8880
17
  COPY start.sh /start.sh
18
  RUN chmod +x /start.sh
19
 
20
- # Start the wrapper script
21
- CMD ["/start.sh"]
 
2
 
3
  # Switch to root so we can install packages
4
  USER root
 
5
  RUN apt-get update && apt-get install -y socat && rm -rf /var/lib/apt/lists/*
6
 
7
+ # Set the PORT environment variable.
8
+ # Hugging Face Spaces will provide a $PORT value; default to 8880 if not set.
 
 
 
9
  ENV PORT=8880
10
+
11
+ # Expose the port (the value of $PORT)
12
  EXPOSE ${PORT}
13
 
14
+ # Copy in our wrapper startup script
15
  COPY start.sh /start.sh
16
  RUN chmod +x /start.sh
17
 
18
+ # Override the base image’s entrypoint so only our script runs.
19
+ ENTRYPOINT ["/start.sh"]