diff --git a/docker/Dockerfile.windows b/docker/Dockerfile.windows index df9d6fbf80..ef754ea193 100644 --- a/docker/Dockerfile.windows +++ b/docker/Dockerfile.windows @@ -1,5 +1,4 @@ -ARG tagversion="ltsc2016" -FROM mcr.microsoft.com/windows/servercore:${tagversion} +FROM mcr.microsoft.com/dotnet/framework/runtime:4.8-windowsservercore-ltsc2016 LABEL org.opencontainers.image.url="https://chocolatey.org/" LABEL org.opencontainers.image.documentation="https://docs.chocolatey.org/" @@ -9,7 +8,7 @@ LABEL org.opencontainers.image.licenses="Apache-2.0" LABEL org.opencontainers.image.title="Chocolatey" LABEL org.opencontainers.image.description="Chocolatey Client running on .NET" LABEL org.opencontainers.image.authors="https://chocolatey.org/support" -LABEL org.opencontainers.image.base.name="mcr.microsoft.com/windows/servercore:${tagversion}" +LABEL org.opencontainers.image.base.name="mcr.microsoft.com/dotnet/framework/runtime:4.8-windowsservercore-ltsc2016" COPY ./code_drop/Packages/Chocolatey C:/choco-nupkg COPY ./docker/Install-ChocolateyInContainer.ps1 C:/choco-nupkg/Install-ChocolateyInContainer.ps1 diff --git a/docker/README.md b/docker/README.md index 72f75d425b..8b5d091a38 100644 --- a/docker/README.md +++ b/docker/README.md @@ -10,7 +10,6 @@ To build the Windows image yourself, follow these steps: 1. Either build choco on the host or put a pre-built chocolatey `.nupkg` in `.\code_drop\Packages\Chocolatey`. * See the README at the root of the repository for instructions on how to build choco. 1. Run the docker build command. `docker build -t choco:latest-windows -f docker/Dockerfile.windows .` (the trailing . is important) - * To change the version of the servercore image used, add the argument `--build-arg tagversion=servercore-tag` * To build a official version, put an official `.nupkg` in `.\code_drop\Packages\Chocolatey` and change the image name to `chocolatey/choco:latest-windows` * If you get messages similar to "Can't add file x to tar: archive/tar: missed writing 794 bytes", make sure Visual Studio is closed. 1. Run your new image using the command `docker run -ti --rm choco:latest-windows cmd.exe`