LogicGoInfotechSpaces commited on
Commit
76c83b6
·
1 Parent(s): 8294547

Improve entrypoint script creation in Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -1
Dockerfile CHANGED
@@ -28,7 +28,12 @@ RUN mkdir -p uploads results
28
 
29
  # Handle Firebase credentials from environment variable (for Hugging Face Spaces secrets)
30
  # This allows the credentials to be passed as a secret and written to file at runtime
31
- RUN echo '#!/bin/bash\nif [ -n "$FIREBASE_CREDENTIALS" ]; then echo "$FIREBASE_CREDENTIALS" > colorize-662df-firebase-adminsdk-fbsvc-e080668793.json; fi\nexec "$@"' > /entrypoint.sh && chmod +x /entrypoint.sh
 
 
 
 
 
32
 
33
  # Expose port (Hugging Face Spaces uses port 7860)
34
  EXPOSE 7860
 
28
 
29
  # Handle Firebase credentials from environment variable (for Hugging Face Spaces secrets)
30
  # This allows the credentials to be passed as a secret and written to file at runtime
31
+ RUN echo '#!/bin/bash' > /entrypoint.sh && \
32
+ echo 'if [ -n "$FIREBASE_CREDENTIALS" ]; then' >> /entrypoint.sh && \
33
+ echo ' echo "$FIREBASE_CREDENTIALS" > colorize-662df-firebase-adminsdk-fbsvc-e080668793.json' >> /entrypoint.sh && \
34
+ echo 'fi' >> /entrypoint.sh && \
35
+ echo 'exec "$@"' >> /entrypoint.sh && \
36
+ chmod +x /entrypoint.sh
37
 
38
  # Expose port (Hugging Face Spaces uses port 7860)
39
  EXPOSE 7860