Sorry for the confusion. Looks like you don’t have the Dockerfile in the same folder as your python files for the app. You have to create the dockerfile and it should contain all the lines the article explains in section 2), of course adapted to your app. For example, if your streamlit file is ‘myapp.py’ and it imports another .py file ‘mymodule.py’ from the same folder , then the Dockerfile could look like this:
FROM python:3.10
WORKDIR /app
COPY requirements.txt ./requirements.txt
RUN pip install -r requirements.txt
EXPOSE 8501
COPY myapp.py ./myapp.py
COPY mymodule.py ./mymodule.py
ENTRYPOINT ["streamlit", "run"]
CMD ["myapp.py"]
Another file you need is requirements.txt to import modules available via pip install into the container , in particular streamlit itself. For example if you need pandas and plotly, requirements.txt looks like this;
streamlit
pandas
plotly
The docker build etc commands are executed on a normal windows terminal/shell (dos box) . Check that you are in the right folder where your app files are located.
After you did run the the container once form the commandline you can start and stop it also from the Docker App GUI without the need for the terminal window!
Btw, with the docker run command you can also map your app to a different tcpip port, For example to map it to 8510 instead of the default 8501 execute (maypp1 is assumed to be the name of your container) :
docker run -p 8510:8501 myapp1:latest
If you want to run multiple streamlit containers choose a distinct port for each app (8510, 8511…)
hope this helps a little