Windows Docker for streamlit app

Hello All,
My requirements are as follows:

  1. Get a Windows 11 image
  2. install python 3.13
  3. create virtual environment
  4. activate virtual environment
  5. Install Streamlit and other required packages.
  6. copy application
  7. run Streamlit application

When I tried to create a docker with Linux system, its working fine. Below is my Dockerfile

FROM python:3.9.20-slim

WORKDIR /app

RUN apt-get update && apt-get install -y \
    build-essential \
    curl \
    software-properties-common \
    git \
    && rm -rf /var/lib/apt/lists/*

COPY ./.streamlit /app/.streamlit
COPY ./requirements.txt /app/requirements.txt
COPY ./pyproject.toml /app/pyproject.toml
COPY ./src /app/src
COPY ./contract.db /app/

RUN pip3 install -r requirements.txt

RUN pip3 install -e .

ENV PYTHONUNBUFFERED=1
ENV PYTHONIOENCODING=UTF-8

EXPOSE 8501

HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health

ENTRYPOINT ["streamlit", "run", "src/enx_streamlit/xxx.py", "--server.port=8501", "--server.address=0.0.0.0"]

Someone please help. I appreciate any help you can provide.

I’m not sure what your question is. I see your “requirements”, but the only difference I see compared to the Dockerfile is the Python version and that you mention Windows image. If you want to use Windows containers you will need to know Powershell or windows command line to install and execte what you need.

If you are looking for a base image, there are windows-based Python images in the description of the Python image repo

https://hub.docker.com/_/python

Thanks for the feedback. I have solved my issue. I have to provide some configuration for Streamlit and remove some non-required packages.