A volume mount makes files kept outside a Docker image available inside a running container. This is useful when an app needs configuration or secrets without copying them into the image. section 12.2.5
The -v option uses the form <path-on-host>:<path-on-container>. For example, -v ./.streamlit/:/app/.streamlit maps the host’s .streamlit directory to /app/.streamlit inside the container. section 12.2.5
Mounting Streamlit secrets at runtime
After building the fact-frenzy image, run docker run -p 8502:8501 -v ./.streamlit/:/app/.streamlit fact-frenzy. The port mapping exposes the app locally, while the mount supplies secrets.toml without placing it in the image. section 12.2.5
Deployment changes the source path rather than the mounting idea. In Elastic Beanstalk, docker-compose.yml mounts /var/app/secrets/.streamlit on the server to /app/.streamlit in the container. section 12.3.5
docker run -p 8502:8501 -v ./.streamlit/:/app/.streamlit fact-frenzy
Inspect the complete docker run command that combines port forwarding with the .streamlit volume mount. section 12.2.5

