Merge pull request #40 from infosiftr/arch
Add "arch" to the produced output
This commit is contained in:
commit
e2bcd7a682
3
Makefile
3
Makefile
|
|
@ -9,12 +9,13 @@ STRIP := strip
|
|||
all: $(C_TARGETS)
|
||||
|
||||
$(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')\"" -D DOCKER_ARCH='"$(TARGET_ARCH)"' '$<'
|
||||
$(STRIP) -R .comment -s '$@'
|
||||
@if [ '$(TARGET_ARCH)' = 'amd64' ]; then \
|
||||
for winVariant in nanoserver nanoserver1709; do \
|
||||
mkdir -p "$(@D)/$$winVariant"; \
|
||||
'$@' | sed \
|
||||
-e 's/[(]$(TARGET_ARCH)[)]/(windows-$(TARGET_ARCH))/g' \
|
||||
-e 's/an Ubuntu container/a Windows Server container/g' \
|
||||
-e 's!ubuntu bash!microsoft/windowsservercore powershell!g' \
|
||||
-e 's![$$] docker!PS C:\\> docker!g' \
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -5,6 +5,7 @@ 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)
|
||||
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
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ 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)
|
||||
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
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -5,6 +5,7 @@ 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)
|
||||
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
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ 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)
|
||||
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
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -5,6 +5,7 @@ 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)
|
||||
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
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ 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)
|
||||
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
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
5
hello.c
5
hello.c
|
|
@ -9,6 +9,10 @@
|
|||
#define DOCKER_GREETING "Hello from Docker!"
|
||||
#endif
|
||||
|
||||
#ifndef DOCKER_ARCH
|
||||
#define DOCKER_ARCH "amd64"
|
||||
#endif
|
||||
|
||||
const char message[] =
|
||||
"\n"
|
||||
DOCKER_GREETING "\n"
|
||||
|
|
@ -17,6 +21,7 @@ const char message[] =
|
|||
"To generate this message, Docker took the following steps:\n"
|
||||
" 1. The Docker client contacted the Docker daemon.\n"
|
||||
" 2. The Docker daemon pulled the \"" DOCKER_IMAGE "\" image from the Docker Hub.\n"
|
||||
" (" DOCKER_ARCH ")\n"
|
||||
" 3. The Docker daemon created a new container from that image which runs the\n"
|
||||
" executable that produces the output you are currently reading.\n"
|
||||
" 4. The Docker daemon streamed that output to the Docker client, which sent it\n"
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue