StefanScherer / dockerfiles-windows

Various Dockerfiles for Windows Containers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dockerfiles-windows

Build status

Various Dockerfiles for Windows. Most of these can be run as Windows Containers on Windows 10, Windows Server 2016, Windows Server 1803 and Windows Server 2019.

Most of these Dockerfiles are automatically built on AppVeyor and pushed to Docker Hub. See the badges in each sub folder's README files.

Getting started

Windows 10

Windows Server 2016

Windows Server 1803

  • Get a Windows Server 1803 Virtual Machine
    • Packer and Vagrant
      • Use Packer with this packer-windows templates to build the windows_server_1803_docker Vagrant box]. You need the ISO file from your MSDN subscription.
      • Use Vagrant and this windows-docker-machine Vagrantfile to have Docker and lots of Docker Tools installed. Run vagrant up 1803.
      • Clone this repo and create some Docker images. Look for the Dockerfile.1803 files.
      • It is recommended to use the smaller base images mcr.microsoft.com/windows/nanoserver:1803 and mcr.microsoft.com/windows/servercore:1803.

Windows Server 2019

  • Get a Windows Server 2019 Virtual Machine
    • Packer and Vagrant
      • Use Packer with this packer-windows templates to build the windows_2019_docker Vagrant box]. You need the ISO file from your MSDN subscription.
      • Use Vagrant and this windows-docker-machine Vagrantfile to have Docker and lots of Docker Tools installed. Run vagrant up 2019.
      • Clone this repo and create some Docker images. Look for the Dockerfile.1809 files.
      • It is recommended to use the smaller base images mcr.microsoft.com/windows/nanoserver:1809 and mcr.microsoft.com/windows/servercore:1809.

Further reading

PowerShell tricks

Porting Dockerfiles from Linux to Windows I found it useful to use PowerShell at some points. Here are some PowerShell tricks that were useful for me.

Feedback and Pull Requests are welcome

If you have some improvements, bug fixes, some new Dockerfiles or more PowerShell tricks, just send me a PR. If you have questions or problems, open an issue for discussion.

Troubleshooting

If you have trouble running Windows Containers you should have a look at https://docs.microsoft.com/virtualization/windowscontainers/troubleshooting

Invoke-WebRequest https://aka.ms/Debug-ContainerHost.ps1 -UseBasicParsing | Invoke-Expression

License

MIT - for more details see the LICENSE file.

About

Various Dockerfiles for Windows Containers

License:MIT License


Languages

Language:JavaScript 60.9%Language:Dockerfile 21.8%Language:PowerShell 11.7%Language:Shell 1.6%Language:HTML 1.4%Language:CSS 0.9%Language:Batchfile 0.6%Language:C++ 0.3%Language:Vim Script 0.2%Language:Go 0.2%Language:Ruby 0.2%Language:EJS 0.1%Language:Pug 0.0%Language:PHP 0.0%