-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
The Docker container fails to start with the error:
Error: Invalid value: File does not exist: app.pyThis is caused by the Dockerfile having a path mismatch issue:
WORKDIR /appsets the working directory to/appCOPYcopies the entire repository, creating the/app/demobuilder/subdirectoryCMD ["streamlit", "run", "app.py", ...]tries to runapp.pyfrom/app
But app.py is actually located at /app/demobuilder/app.py
The fix consists in updating the Dockerfile CMD to use the correct path:
# Run the application - Fixed path to app.py in demobuilder subdirectory
CMD streamlit run demobuilder/app.py \
--server.port=8501 \
--server.address=0.0.0.0 \
--server.headless=true \
--server.enableCORS=false \
--server.enableXsrfProtection=falseSteps to Reproduce
- Build the Docker image:
docker build -t demobuilder:latest -f demobuilder/Dockerfile . - Run the container:
docker run -d --name demobuilder -p 8501:8501 demobuilder:latest
This issue affects Docker deployments but not OpenShift S2I deployments. The S2I process handles the file structure differently. The fix has been implemented and tested locally.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels