Add Windows 1809 support

This commit is contained in:
Tianon Gravi 2018-12-31 12:59:44 -08:00
parent a9a7163cb5
commit 9c93e37114
28 changed files with 103 additions and 23 deletions

View File

@ -1,3 +1,3 @@
FROM microsoft/nanoserver:XXX FROM mcr.microsoft.com/windows/nanoserver:XXX
COPY hello.txt C: COPY hello.txt C:
CMD ["cmd", "/C", "type C:\\hello.txt"] CMD ["cmd", "/C", "type C:\\hello.txt"]

View File

@ -12,12 +12,17 @@ $(C_TARGETS): hello.c
$(CC) $(CFLAGS) -o '$@' -D DOCKER_IMAGE='"$(notdir $(@D))"' -D DOCKER_GREETING="\"$$(cat 'greetings/$(notdir $(@D)).txt')\"" -D DOCKER_ARCH='"$(TARGET_ARCH)"' '$<' $(CC) $(CFLAGS) -o '$@' -D DOCKER_IMAGE='"$(notdir $(@D))"' -D DOCKER_GREETING="\"$$(cat 'greetings/$(notdir $(@D)).txt')\"" -D DOCKER_ARCH='"$(TARGET_ARCH)"' '$<'
$(STRIP) -R .comment -s '$@' $(STRIP) -R .comment -s '$@'
@if [ '$(TARGET_ARCH)' = 'amd64' ]; then \ @if [ '$(TARGET_ARCH)' = 'amd64' ]; then \
for winVariant in nanoserver-sac2016 nanoserver-1709 nanoserver-1803; do \ for winVariant in \
nanoserver-sac2016 \
nanoserver-1709 \
nanoserver-1803 \
nanoserver-1809 \
; do \
mkdir -p "$(@D)/$$winVariant"; \ mkdir -p "$(@D)/$$winVariant"; \
'$@' | sed \ '$@' | sed \
-e 's/[(]$(TARGET_ARCH)[)]/(windows-$(TARGET_ARCH), '"$$winVariant"')/g' \ -e 's/[(]$(TARGET_ARCH)[)]/(windows-$(TARGET_ARCH), '"$$winVariant"')/g' \
-e 's/an Ubuntu container/a Windows Server container/g' \ -e 's/an Ubuntu container/a Windows Server container/g' \
-e 's!ubuntu bash!microsoft/windowsservercore powershell!g' \ -e 's!ubuntu bash!mcr.microsoft.com/windows/servercore powershell!g' \
-e 's![$$] docker!PS C:\\> docker!g' \ -e 's![$$] docker!PS C:\\> docker!g' \
> "$(@D)/$$winVariant/hello.txt"; \ > "$(@D)/$$winVariant/hello.txt"; \
done; \ done; \

View File

@ -1,3 +1,3 @@
FROM microsoft/nanoserver:1709 FROM mcr.microsoft.com/windows/nanoserver:1709
COPY hello.txt C: COPY hello.txt C:
CMD ["cmd", "/C", "type C:\\hello.txt"] CMD ["cmd", "/C", "type C:\\hello.txt"]

View File

@ -12,7 +12,7 @@ To generate this message, Docker took the following steps:
to your terminal. to your terminal.
To try something more ambitious, you can run a Windows Server container with: To try something more ambitious, you can run a Windows Server container with:
PS C:\> docker run -it microsoft/windowsservercore powershell PS C:\> docker run -it mcr.microsoft.com/windows/servercore powershell
Share images, automate workflows, and more with a free Docker ID: Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/ https://hub.docker.com/

View File

@ -1,3 +1,3 @@
FROM microsoft/nanoserver:1803 FROM mcr.microsoft.com/windows/nanoserver:1803
COPY hello.txt C: COPY hello.txt C:
CMD ["cmd", "/C", "type C:\\hello.txt"] CMD ["cmd", "/C", "type C:\\hello.txt"]

View File

@ -12,7 +12,7 @@ To generate this message, Docker took the following steps:
to your terminal. to your terminal.
To try something more ambitious, you can run a Windows Server container with: To try something more ambitious, you can run a Windows Server container with:
PS C:\> docker run -it microsoft/windowsservercore powershell PS C:\> docker run -it mcr.microsoft.com/windows/servercore powershell
Share images, automate workflows, and more with a free Docker ID: Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/ https://hub.docker.com/

View File

@ -0,0 +1,3 @@
FROM mcr.microsoft.com/windows/nanoserver:1809
COPY hello.txt C:
CMD ["cmd", "/C", "type C:\\hello.txt"]

View File

@ -0,0 +1,22 @@
Hello from DockerCon 2016 (Seattle)!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-seattle" image from the Docker Hub.
(windows-amd64, nanoserver-1809)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
To try something more ambitious, you can run a Windows Server container with:
PS C:\> docker run -it mcr.microsoft.com/windows/servercore powershell
Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/
For more examples and ideas, visit:
https://docs.docker.com/get-started/

View File

@ -1,3 +1,3 @@
FROM microsoft/nanoserver:sac2016 FROM mcr.microsoft.com/windows/nanoserver:sac2016
COPY hello.txt C: COPY hello.txt C:
CMD ["cmd", "/C", "type C:\\hello.txt"] CMD ["cmd", "/C", "type C:\\hello.txt"]

View File

@ -12,7 +12,7 @@ To generate this message, Docker took the following steps:
to your terminal. to your terminal.
To try something more ambitious, you can run a Windows Server container with: To try something more ambitious, you can run a Windows Server container with:
PS C:\> docker run -it microsoft/windowsservercore powershell PS C:\> docker run -it mcr.microsoft.com/windows/servercore powershell
Share images, automate workflows, and more with a free Docker ID: Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/ https://hub.docker.com/

View File

@ -1,3 +1,3 @@
FROM microsoft/nanoserver:1709 FROM mcr.microsoft.com/windows/nanoserver:1709
COPY hello.txt C: COPY hello.txt C:
CMD ["cmd", "/C", "type C:\\hello.txt"] CMD ["cmd", "/C", "type C:\\hello.txt"]

View File

@ -12,7 +12,7 @@ To generate this message, Docker took the following steps:
to your terminal. to your terminal.
To try something more ambitious, you can run a Windows Server container with: To try something more ambitious, you can run a Windows Server container with:
PS C:\> docker run -it microsoft/windowsservercore powershell PS C:\> docker run -it mcr.microsoft.com/windows/servercore powershell
Share images, automate workflows, and more with a free Docker ID: Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/ https://hub.docker.com/

View File

@ -1,3 +1,3 @@
FROM microsoft/nanoserver:1803 FROM mcr.microsoft.com/windows/nanoserver:1803
COPY hello.txt C: COPY hello.txt C:
CMD ["cmd", "/C", "type C:\\hello.txt"] CMD ["cmd", "/C", "type C:\\hello.txt"]

View File

@ -12,7 +12,7 @@ To generate this message, Docker took the following steps:
to your terminal. to your terminal.
To try something more ambitious, you can run a Windows Server container with: To try something more ambitious, you can run a Windows Server container with:
PS C:\> docker run -it microsoft/windowsservercore powershell PS C:\> docker run -it mcr.microsoft.com/windows/servercore powershell
Share images, automate workflows, and more with a free Docker ID: Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/ https://hub.docker.com/

View File

@ -0,0 +1,3 @@
FROM mcr.microsoft.com/windows/nanoserver:1809
COPY hello.txt C:
CMD ["cmd", "/C", "type C:\\hello.txt"]

View File

@ -0,0 +1,22 @@
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
(windows-amd64, nanoserver-1809)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
To try something more ambitious, you can run a Windows Server container with:
PS C:\> docker run -it mcr.microsoft.com/windows/servercore powershell
Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/
For more examples and ideas, visit:
https://docs.docker.com/get-started/

View File

@ -1,3 +1,3 @@
FROM microsoft/nanoserver:sac2016 FROM mcr.microsoft.com/windows/nanoserver:sac2016
COPY hello.txt C: COPY hello.txt C:
CMD ["cmd", "/C", "type C:\\hello.txt"] CMD ["cmd", "/C", "type C:\\hello.txt"]

View File

@ -12,7 +12,7 @@ To generate this message, Docker took the following steps:
to your terminal. to your terminal.
To try something more ambitious, you can run a Windows Server container with: To try something more ambitious, you can run a Windows Server container with:
PS C:\> docker run -it microsoft/windowsservercore powershell PS C:\> docker run -it mcr.microsoft.com/windows/servercore powershell
Share images, automate workflows, and more with a free Docker ID: Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/ https://hub.docker.com/

View File

@ -1,3 +1,3 @@
FROM microsoft/nanoserver:1709 FROM mcr.microsoft.com/windows/nanoserver:1709
COPY hello.txt C: COPY hello.txt C:
CMD ["cmd", "/C", "type C:\\hello.txt"] CMD ["cmd", "/C", "type C:\\hello.txt"]

View File

@ -12,7 +12,7 @@ To generate this message, Docker took the following steps:
to your terminal. to your terminal.
To try something more ambitious, you can run a Windows Server container with: To try something more ambitious, you can run a Windows Server container with:
PS C:\> docker run -it microsoft/windowsservercore powershell PS C:\> docker run -it mcr.microsoft.com/windows/servercore powershell
Share images, automate workflows, and more with a free Docker ID: Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/ https://hub.docker.com/

View File

@ -1,3 +1,3 @@
FROM microsoft/nanoserver:1803 FROM mcr.microsoft.com/windows/nanoserver:1803
COPY hello.txt C: COPY hello.txt C:
CMD ["cmd", "/C", "type C:\\hello.txt"] CMD ["cmd", "/C", "type C:\\hello.txt"]

View File

@ -12,7 +12,7 @@ To generate this message, Docker took the following steps:
to your terminal. to your terminal.
To try something more ambitious, you can run a Windows Server container with: To try something more ambitious, you can run a Windows Server container with:
PS C:\> docker run -it microsoft/windowsservercore powershell PS C:\> docker run -it mcr.microsoft.com/windows/servercore powershell
Share images, automate workflows, and more with a free Docker ID: Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/ https://hub.docker.com/

View File

@ -0,0 +1,3 @@
FROM mcr.microsoft.com/windows/nanoserver:1809
COPY hello.txt C:
CMD ["cmd", "/C", "type C:\\hello.txt"]

View File

@ -0,0 +1,22 @@
¡Hola de DockerCon EU 2015 (Barcelona)!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hola-mundo" image from the Docker Hub.
(windows-amd64, nanoserver-1809)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
To try something more ambitious, you can run a Windows Server container with:
PS C:\> docker run -it mcr.microsoft.com/windows/servercore powershell
Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/
For more examples and ideas, visit:
https://docs.docker.com/get-started/

View File

@ -1,3 +1,3 @@
FROM microsoft/nanoserver:sac2016 FROM mcr.microsoft.com/windows/nanoserver:sac2016
COPY hello.txt C: COPY hello.txt C:
CMD ["cmd", "/C", "type C:\\hello.txt"] CMD ["cmd", "/C", "type C:\\hello.txt"]

View File

@ -12,7 +12,7 @@ To generate this message, Docker took the following steps:
to your terminal. to your terminal.
To try something more ambitious, you can run a Windows Server container with: To try something more ambitious, you can run a Windows Server container with:
PS C:\> docker run -it microsoft/windowsservercore powershell PS C:\> docker run -it mcr.microsoft.com/windows/servercore powershell
Share images, automate workflows, and more with a free Docker ID: Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/ https://hub.docker.com/

View File

@ -62,7 +62,7 @@ for arch in "${arches[@]}"; do
EOE EOE
done done
for winVariant in nanoserver-{sac2016,1709,1803}; do for winVariant in nanoserver-{sac2016,1709,1803,1809}; do
winArches=( *"/$image/$winVariant/hello.txt" ) winArches=( *"/$image/$winVariant/hello.txt" )
winArches=( "${winArches[@]%"/$image/$winVariant/hello.txt"}" ) winArches=( "${winArches[@]%"/$image/$winVariant/hello.txt"}" )

View File

@ -17,7 +17,7 @@ for h in */*/nanoserver-*/Dockerfile; do
nano="$(dirname "$h")" nano="$(dirname "$h")"
nano="$(basename "$nano")" nano="$(basename "$nano")"
nano="${nano#nanoserver-}" nano="${nano#nanoserver-}"
sed -i 's!FROM .*!FROM microsoft/nanoserver:'"$nano"'!' "$h" sed -i 's!FROM .*!FROM mcr.microsoft.com/windows/nanoserver:'"$nano"'!' "$h"
done done
for h in amd64/*/hello; do for h in amd64/*/hello; do