This repository demonstrates how to build Windows Docker images using GitHub Actions - perfect for developers who need to create Windows containers without access to a Windows machine.
- Fork this repository
- Set up Docker Hub secrets in your GitHub repository:
DOCKERHUB_USERNAMEDOCKERHUB_TOKEN
- Push to main branch or create a tag to trigger the build
- Simple Python Flask web application
- Windows-based Dockerfile
- GitHub Actions workflow for automated builds
- Example of Windows container best practices
A simple Flask web application that displays:
- Container hostname
- Python version
- Operating system information
If you have a Windows machine with Docker Desktop:
# Build the image docker build -t windows-python-app . # Run the container docker run -p 80:80 windows-python-appVisit http://localhost to see the app running.
This repository uses GitHub Actions to automatically:
- Build the Windows Docker image
- Push to Docker Hub (on main branch pushes and tags)
- Handle versioning and tagging
. ├── .github/ │ └── workflows/ │ └── build.yaml ├── app.py ├── requirements.txt ├── Dockerfile └── README.md The Dockerfile:
- Uses Windows Server Core as base image
- Installs Python in a Windows environment
- Sets up the application
- Configures the container for web access
- Go to your repository Settings
- Navigate to Secrets and Variables → Actions
- Add required secrets:
DOCKERHUB_USERNAME: Your Docker Hub usernameDOCKERHUB_TOKEN: Your Docker Hub access token
Contributions are welcome! Please feel free to submit a Pull Request.
Feel free to reach out to me on Twitter @bobbyiliev_!