Add "nanoserver" variants using "hello.txt" + powershell
This commit is contained in:
parent
f98ccd0399
commit
0f30176f82
|
|
@ -1,6 +1,7 @@
|
|||
*.md
|
||||
*.sh
|
||||
*/hello
|
||||
*/nanoserver/hello.txt
|
||||
.dockerignore
|
||||
.git
|
||||
Dockerfile*
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ before_script:
|
|||
|
||||
script:
|
||||
- ./update.sh
|
||||
- test -z "$(git status --porcelain '*/hello')"
|
||||
- test -z "$(git status --porcelain '*/hello' '*/nanoserver/hello.txt')"
|
||||
- docker build -t "$image" hello-world
|
||||
- ~/official-images/test/run.sh "$image"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# explicitly use Debian for maximum cross-architecture compatibility
|
||||
FROM debian:jessie
|
||||
FROM debian:jessie-slim
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
gcc \
|
||||
|
|
@ -10,8 +10,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||
WORKDIR /usr/src/hello
|
||||
COPY . .
|
||||
|
||||
RUN set -x \
|
||||
&& make clean all test \
|
||||
&& ls -l */hello
|
||||
RUN set -ex; \
|
||||
make clean all test; \
|
||||
find \( -name 'hello' -or -name 'hello.txt' \) -exec ls -l '{}' +
|
||||
|
||||
CMD ["./hello-world/hello"]
|
||||
|
|
|
|||
2
Makefile
2
Makefile
|
|
@ -9,6 +9,8 @@ all: $(C_TARGETS)
|
|||
$(C_TARGETS): hello.c
|
||||
$(CC) $(CFLAGS) -o '$@' -D DOCKER_IMAGE='"$(@D)"' -D DOCKER_GREETING="\"$$(cat '$(@D)/greeting.txt')\"" '$<'
|
||||
strip -R .comment -s '$@'
|
||||
@mkdir -p '$(@D)/nanoserver'
|
||||
'$@' | sed -e 's/an Ubuntu container/a Nano Server container/g' -e 's!ubuntu bash!microsoft/nanoserver powershell!g' > '$(@D)/nanoserver/hello.txt'
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ cat <<-EOH
|
|||
Maintainers: Tianon Gravi <admwiggin@gmail.com> (@tianon),
|
||||
Joseph Ferguson <yosifkit@gmail.com> (@yosifkit)
|
||||
GitRepo: https://github.com/docker-library/hello-world.git
|
||||
Directory: $image
|
||||
EOH
|
||||
|
||||
commit="$(dirCommit "$image")"
|
||||
|
|
@ -43,4 +42,16 @@ echo
|
|||
cat <<-EOE
|
||||
Tags: latest
|
||||
GitCommit: $commit
|
||||
Directory: $image
|
||||
EOE
|
||||
|
||||
if [ -d "$image/nanoserver" ]; then
|
||||
commit="$(dirCommit "$image/nanoserver")"
|
||||
|
||||
echo
|
||||
cat <<-EOE
|
||||
Tags: nanoserver
|
||||
GitCommit: $commit
|
||||
Directory: $image/nanoserver
|
||||
EOE
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
FROM microsoft/nanoserver
|
||||
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 Nano Server container with:
|
||||
$ docker run -it microsoft/nanoserver powershell
|
||||
|
||||
Share images, automate workflows, and more with a free Docker Hub account:
|
||||
https://hub.docker.com
|
||||
|
||||
For more examples and ideas, visit:
|
||||
https://docs.docker.com/engine/userguide/
|
||||
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
FROM microsoft/nanoserver
|
||||
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 Nano Server container with:
|
||||
$ docker run -it microsoft/nanoserver powershell
|
||||
|
||||
Share images, automate workflows, and more with a free Docker Hub account:
|
||||
https://hub.docker.com
|
||||
|
||||
For more examples and ideas, visit:
|
||||
https://docs.docker.com/engine/userguide/
|
||||
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
FROM microsoft/nanoserver
|
||||
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 Nano Server container with:
|
||||
$ docker run -it microsoft/nanoserver powershell
|
||||
|
||||
Share images, automate workflows, and more with a free Docker Hub account:
|
||||
https://hub.docker.com
|
||||
|
||||
For more examples and ideas, visit:
|
||||
https://docs.docker.com/engine/userguide/
|
||||
|
||||
|
|
@ -7,8 +7,8 @@ set -x
|
|||
|
||||
docker build -f Dockerfile.build -t hello-world:build .
|
||||
|
||||
rm -rf */hello
|
||||
docker run --rm hello-world:build sh -c 'tar --create */hello' | tar --extract --wildcards '*/hello'
|
||||
rm -rf */hello */nanoserver/hello.txt
|
||||
docker run --rm hello-world:build sh -c 'find \( -name hello -or -name hello.txt \) -print0 | xargs -0 tar --create' | tar --extract --verbose
|
||||
|
||||
for h in */hello; do
|
||||
d="$(dirname "$h")"
|
||||
|
|
@ -16,3 +16,4 @@ for h in */hello; do
|
|||
docker build -t hello-world:"test-$d" "$d"
|
||||
docker run --rm hello-world:"test-$d"
|
||||
done
|
||||
ls -l */nanoserver/hello.txt || :
|
||||
|
|
|
|||
Loading…
Reference in New Issue