Add microsoft/nanoserver:1709 variants
This commit is contained in:
parent
8e561416fa
commit
b9c8214f52
14
Makefile
14
Makefile
|
|
@ -12,12 +12,14 @@ $(C_TARGETS): hello.c
|
||||||
$(CC) $(CFLAGS) -o '$@' -D DOCKER_IMAGE='"$(notdir $(@D))"' -D DOCKER_GREETING="\"$$(cat 'greetings/$(notdir $(@D)).txt')\"" '$<'
|
$(CC) $(CFLAGS) -o '$@' -D DOCKER_IMAGE='"$(notdir $(@D))"' -D DOCKER_GREETING="\"$$(cat 'greetings/$(notdir $(@D)).txt')\"" '$<'
|
||||||
$(STRIP) -R .comment -s '$@'
|
$(STRIP) -R .comment -s '$@'
|
||||||
@if [ '$(TARGET_ARCH)' = 'amd64' ]; then \
|
@if [ '$(TARGET_ARCH)' = 'amd64' ]; then \
|
||||||
mkdir -p '$(@D)/nanoserver'; \
|
for winVariant in nanoserver nanoserver1709; do \
|
||||||
'$@' | sed \
|
mkdir -p "$(@D)/$$winVariant"; \
|
||||||
-e 's/an Ubuntu container/a Windows Server container/g' \
|
'$@' | sed \
|
||||||
-e 's!ubuntu bash!microsoft/windowsservercore powershell!g' \
|
-e 's/an Ubuntu container/a Windows Server container/g' \
|
||||||
-e 's![$$] docker!PS C:\\> docker!g' \
|
-e 's!ubuntu bash!microsoft/windowsservercore powershell!g' \
|
||||||
> '$(@D)/nanoserver/hello.txt'; \
|
-e 's![$$] docker!PS C:\\> docker!g' \
|
||||||
|
> "$(@D)/$$winVariant/hello.txt"; \
|
||||||
|
done; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
FROM microsoft/nanoserver:1709
|
||||||
|
COPY hello.txt C:
|
||||||
|
CMD ["cmd", "/C", "type C:\\hello.txt"]
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
|
||||||
|
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.
|
||||||
|
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 microsoft/windowsservercore powershell
|
||||||
|
|
||||||
|
Share images, automate workflows, and more with a free Docker ID:
|
||||||
|
https://cloud.docker.com/
|
||||||
|
|
||||||
|
For more examples and ideas, visit:
|
||||||
|
https://docs.docker.com/engine/userguide/
|
||||||
|
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
FROM microsoft/nanoserver:1709
|
||||||
|
COPY hello.txt C:
|
||||||
|
CMD ["cmd", "/C", "type C:\\hello.txt"]
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
|
||||||
|
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.
|
||||||
|
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 microsoft/windowsservercore powershell
|
||||||
|
|
||||||
|
Share images, automate workflows, and more with a free Docker ID:
|
||||||
|
https://cloud.docker.com/
|
||||||
|
|
||||||
|
For more examples and ideas, visit:
|
||||||
|
https://docs.docker.com/engine/userguide/
|
||||||
|
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
FROM microsoft/nanoserver:1709
|
||||||
|
COPY hello.txt C:
|
||||||
|
CMD ["cmd", "/C", "type C:\\hello.txt"]
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
|
||||||
|
¡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.
|
||||||
|
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 microsoft/windowsservercore powershell
|
||||||
|
|
||||||
|
Share images, automate workflows, and more with a free Docker ID:
|
||||||
|
https://cloud.docker.com/
|
||||||
|
|
||||||
|
For more examples and ideas, visit:
|
||||||
|
https://docs.docker.com/engine/userguide/
|
||||||
|
|
||||||
|
|
@ -62,24 +62,26 @@ for arch in "${arches[@]}"; do
|
||||||
EOE
|
EOE
|
||||||
done
|
done
|
||||||
|
|
||||||
winArches=( *"/$image/nanoserver/hello.txt" )
|
for winVariant in nanoserver nanoserver1709; do
|
||||||
winArches=( "${winArches[@]%"/$image/nanoserver/hello.txt"}" )
|
winArches=( *"/$image/$winVariant/hello.txt" )
|
||||||
|
winArches=( "${winArches[@]%"/$image/$winVariant/hello.txt"}" )
|
||||||
|
|
||||||
if [ "${#winArches[@]}" -gt 0 ]; then
|
if [ "${#winArches[@]}" -gt 0 ]; then
|
||||||
echo
|
echo
|
||||||
cat <<-EOE
|
|
||||||
Tags: nanoserver
|
|
||||||
SharedTags: latest
|
|
||||||
Architectures: $(join ', ' "${winArches[@]/#/windows-}")
|
|
||||||
EOE
|
|
||||||
for arch in "${winArches[@]}"; do
|
|
||||||
commit="$(dirCommit "$arch/$image/nanoserver")"
|
|
||||||
cat <<-EOE
|
cat <<-EOE
|
||||||
windows-$arch-GitCommit: $commit
|
Tags: $winVariant
|
||||||
windows-$arch-Directory: $arch/$image/nanoserver
|
SharedTags: latest
|
||||||
|
Architectures: $(join ', ' "${winArches[@]/#/windows-}")
|
||||||
EOE
|
EOE
|
||||||
done
|
for arch in "${winArches[@]}"; do
|
||||||
cat <<-EOE
|
commit="$(dirCommit "$arch/$image/$winVariant")"
|
||||||
Constraints: nanoserver
|
cat <<-EOE
|
||||||
EOE
|
windows-$arch-GitCommit: $commit
|
||||||
fi
|
windows-$arch-Directory: $arch/$image/$winVariant
|
||||||
|
EOE
|
||||||
|
done
|
||||||
|
cat <<-EOE
|
||||||
|
Constraints: $winVariant
|
||||||
|
EOE
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
|
||||||
|
|
@ -17,4 +17,4 @@ for h in amd64/*/hello; do
|
||||||
docker build -t hello-world:"test-$b" "$d"
|
docker build -t hello-world:"test-$b" "$d"
|
||||||
docker run --rm hello-world:"test-$b"
|
docker run --rm hello-world:"test-$b"
|
||||||
done
|
done
|
||||||
ls -lh */*/{hello,nanoserver/hello.txt} || :
|
ls -lh */*/{hello,nanoserver*/hello.txt} || :
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue