From 7d0ee592e4ed60e2da9d59331e16ecdcadc1ed87 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Tue, 13 Jun 2017 15:55:03 -0700 Subject: [PATCH] Add initial multiarchitecture support via Debian cross-compiled binaries --- .dockerignore | 4 +- .travis.yml | 4 +- Dockerfile.build | 60 +++++++++++++++++- Makefile | 16 +++-- .../hello-seattle}/Dockerfile | 0 {hello-seattle => amd64/hello-seattle}/hello | Bin 1856 -> 1856 bytes .../hello-seattle}/nanoserver/Dockerfile | 0 .../hello-seattle}/nanoserver/hello.txt | 0 {hello-world => amd64/hello-world}/Dockerfile | 0 {hello-world => amd64/hello-world}/hello | Bin 1840 -> 1840 bytes .../hello-world}/nanoserver/Dockerfile | 0 .../hello-world}/nanoserver/hello.txt | 0 {hola-mundo => amd64/hola-mundo}/Dockerfile | 0 {hola-mundo => amd64/hola-mundo}/hello | Bin 1856 -> 1856 bytes .../hola-mundo}/nanoserver/Dockerfile | 0 .../hola-mundo}/nanoserver/hello.txt | 0 arm32v5/hello-seattle/Dockerfile | 3 + arm32v5/hello-seattle/hello | Bin 0 -> 1696 bytes arm32v5/hello-world/Dockerfile | 3 + arm32v5/hello-world/hello | Bin 0 -> 1676 bytes arm32v5/hola-mundo/Dockerfile | 3 + arm32v5/hola-mundo/hello | Bin 0 -> 1696 bytes arm32v7/hello-seattle/Dockerfile | 3 + arm32v7/hello-seattle/hello | Bin 0 -> 1648 bytes arm32v7/hello-world/Dockerfile | 3 + arm32v7/hello-world/hello | Bin 0 -> 1628 bytes arm32v7/hola-mundo/Dockerfile | 3 + arm32v7/hola-mundo/hello | Bin 0 -> 1648 bytes arm64v8/hello-seattle/Dockerfile | 3 + arm64v8/hello-seattle/hello | Bin 0 -> 4752 bytes arm64v8/hello-world/Dockerfile | 3 + arm64v8/hello-world/hello | Bin 0 -> 4752 bytes arm64v8/hola-mundo/Dockerfile | 3 + arm64v8/hola-mundo/hello | Bin 0 -> 4752 bytes generate-stackbrew-library.sh | 41 +++++++++--- .../hello-seattle.txt | 0 .../greeting.txt => greetings/hello-world.txt | 0 .../greeting.txt => greetings/hola-mundo.txt | 0 i386/hello-seattle/Dockerfile | 3 + i386/hello-world/Dockerfile | 3 + i386/hola-mundo/Dockerfile | 3 + ppc64le/hello-seattle/Dockerfile | 3 + ppc64le/hello-seattle/hello | Bin 0 -> 65872 bytes ppc64le/hello-world/Dockerfile | 3 + ppc64le/hello-world/hello | Bin 0 -> 65872 bytes ppc64le/hola-mundo/Dockerfile | 3 + ppc64le/hola-mundo/hello | Bin 0 -> 65872 bytes s390x/hello-seattle/Dockerfile | 3 + s390x/hello-seattle/hello | Bin 0 -> 1984 bytes s390x/hello-world/Dockerfile | 3 + s390x/hello-world/hello | Bin 0 -> 1968 bytes s390x/hola-mundo/Dockerfile | 3 + s390x/hola-mundo/hello | Bin 0 -> 1984 bytes update.sh | 9 +-- 54 files changed, 163 insertions(+), 25 deletions(-) rename {hello-seattle => amd64/hello-seattle}/Dockerfile (100%) rename {hello-seattle => amd64/hello-seattle}/hello (89%) rename {hello-seattle => amd64/hello-seattle}/nanoserver/Dockerfile (100%) rename {hello-seattle => amd64/hello-seattle}/nanoserver/hello.txt (100%) rename {hello-world => amd64/hello-world}/Dockerfile (100%) rename {hello-world => amd64/hello-world}/hello (88%) rename {hello-world => amd64/hello-world}/nanoserver/Dockerfile (100%) rename {hello-world => amd64/hello-world}/nanoserver/hello.txt (100%) rename {hola-mundo => amd64/hola-mundo}/Dockerfile (100%) rename {hola-mundo => amd64/hola-mundo}/hello (85%) rename {hola-mundo => amd64/hola-mundo}/nanoserver/Dockerfile (100%) rename {hola-mundo => amd64/hola-mundo}/nanoserver/hello.txt (100%) create mode 100644 arm32v5/hello-seattle/Dockerfile create mode 100755 arm32v5/hello-seattle/hello create mode 100644 arm32v5/hello-world/Dockerfile create mode 100755 arm32v5/hello-world/hello create mode 100644 arm32v5/hola-mundo/Dockerfile create mode 100755 arm32v5/hola-mundo/hello create mode 100644 arm32v7/hello-seattle/Dockerfile create mode 100755 arm32v7/hello-seattle/hello create mode 100644 arm32v7/hello-world/Dockerfile create mode 100755 arm32v7/hello-world/hello create mode 100644 arm32v7/hola-mundo/Dockerfile create mode 100755 arm32v7/hola-mundo/hello create mode 100644 arm64v8/hello-seattle/Dockerfile create mode 100755 arm64v8/hello-seattle/hello create mode 100644 arm64v8/hello-world/Dockerfile create mode 100755 arm64v8/hello-world/hello create mode 100644 arm64v8/hola-mundo/Dockerfile create mode 100755 arm64v8/hola-mundo/hello rename hello-seattle/greeting.txt => greetings/hello-seattle.txt (100%) rename hello-world/greeting.txt => greetings/hello-world.txt (100%) rename hola-mundo/greeting.txt => greetings/hola-mundo.txt (100%) create mode 100644 i386/hello-seattle/Dockerfile create mode 100644 i386/hello-world/Dockerfile create mode 100644 i386/hola-mundo/Dockerfile create mode 100644 ppc64le/hello-seattle/Dockerfile create mode 100755 ppc64le/hello-seattle/hello create mode 100644 ppc64le/hello-world/Dockerfile create mode 100755 ppc64le/hello-world/hello create mode 100644 ppc64le/hola-mundo/Dockerfile create mode 100755 ppc64le/hola-mundo/hello create mode 100644 s390x/hello-seattle/Dockerfile create mode 100755 s390x/hello-seattle/hello create mode 100644 s390x/hello-world/Dockerfile create mode 100755 s390x/hello-world/hello create mode 100644 s390x/hola-mundo/Dockerfile create mode 100755 s390x/hola-mundo/hello diff --git a/.dockerignore b/.dockerignore index 1e02921..f6d59c3 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,7 +1,7 @@ *.md *.sh -*/hello -*/nanoserver/hello.txt +**/hello +**/nanoserver/hello.txt .dockerignore .git Dockerfile* diff --git a/.travis.yml b/.travis.yml index e3965b2..c70dca4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,8 +10,8 @@ before_script: script: - ./update.sh - - test -z "$(git status --porcelain '*/hello' '*/nanoserver/hello.txt')" - - travis_retry travis_retry travis_retry docker build -t "$image" hello-world + - test -z "$(git status --porcelain '**/hello' '**/nanoserver/hello.txt')" + - travis_retry docker build -t "$image" amd64/hello-world - ~/official-images/test/run.sh "$image" after_script: diff --git a/Dockerfile.build b/Dockerfile.build index 91302d9..74e9ddd 100644 --- a/Dockerfile.build +++ b/Dockerfile.build @@ -1,17 +1,71 @@ # explicitly use Debian for maximum cross-architecture compatibility -FROM debian:jessie-slim +FROM debian:stretch-slim + +#RUN dpkg --add-architecture i386 RUN apt-get update && apt-get install -y --no-install-recommends \ gcc \ libc6-dev \ make \ +# \ +# gcc-multilib \ +# libc6-dev-i386 \ +# linux-libc-dev:i386 \ + \ + libc6-dev-arm64-cross \ + libc6-dev-armel-cross \ + libc6-dev-armhf-cross \ + libc6-dev-ppc64el-cross \ + libc6-dev-s390x-cross \ + \ + gcc-aarch64-linux-gnu \ + gcc-arm-linux-gnueabi \ + gcc-arm-linux-gnueabihf \ + gcc-powerpc64le-linux-gnu \ + gcc-s390x-linux-gnu \ && rm -rf /var/lib/apt/lists/* WORKDIR /usr/src/hello COPY . . RUN set -ex; \ - make clean all test; \ - find \( -name 'hello' -or -name 'hello.txt' \) -exec ls -l '{}' + + make clean all test \ + TARGET_ARCH='amd64' \ + CC='x86_64-linux-gnu-gcc' \ + STRIP='x86_64-linux-gnu-strip' + +RUN set -ex; \ + make clean all \ + TARGET_ARCH='arm32v5' \ + CC='arm-linux-gnueabi-gcc' \ + STRIP='arm-linux-gnueabi-strip' + +RUN set -ex; \ + make clean all \ + TARGET_ARCH='arm32v7' \ + CC='arm-linux-gnueabihf-gcc' \ + STRIP='arm-linux-gnueabihf-strip' + +RUN set -ex; \ + make clean all \ + TARGET_ARCH='arm64v8' \ + CC='aarch64-linux-gnu-gcc' \ + STRIP='aarch64-linux-gnu-strip' + +# TODO TARGET_ARCH='i386' (heinous package conflicts trying to get "gcc -m32"/"gcc-multilib" to work with all the cross-compiling gccs) + +RUN set -ex; \ + make clean all \ + TARGET_ARCH='ppc64le' \ + CC='powerpc64le-linux-gnu-gcc' \ + STRIP='powerpc64le-linux-gnu-strip' + +RUN set -ex; \ + make clean all \ + TARGET_ARCH='s390x' \ + CC='s390x-linux-gnu-gcc' \ + STRIP='s390x-linux-gnu-strip' + +RUN find \( -name 'hello' -or -name 'hello.txt' \) -exec ls -lh '{}' + CMD ["./hello-world/hello"] diff --git a/Makefile b/Makefile index 480b318..9675078 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,20 @@ -C_TARGETS := $(addsuffix hello, $(wildcard */)) +TARGET_ARCH := amd64 +C_TARGETS := $(addsuffix hello, $(wildcard $(TARGET_ARCH)/*/)) CC := gcc CFLAGS := -static -Os -nostartfiles -fno-asynchronous-unwind-tables +STRIP := strip .PHONY: all 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' + $(CC) $(CFLAGS) -o '$@' -D DOCKER_IMAGE='"$(notdir $(@D))"' -D DOCKER_GREETING="\"$$(cat 'greetings/$(notdir $(@D)).txt')\"" '$<' + $(STRIP) -R .comment -s '$@' + @if [ '$(TARGET_ARCH)' = 'amd64' ]; then \ + 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'; \ + fi .PHONY: clean clean: @@ -20,5 +24,5 @@ clean: test: $(C_TARGETS) @for b in $^; do \ ( set -x && "./$$b" ); \ - ( set -x && "./$$b" | grep -q '"'"$$(dirname "$$b")"'"' ); \ + ( set -x && "./$$b" | grep -q '"'"$$(basename "$$(dirname "$$b")")"'"' ); \ done diff --git a/hello-seattle/Dockerfile b/amd64/hello-seattle/Dockerfile similarity index 100% rename from hello-seattle/Dockerfile rename to amd64/hello-seattle/Dockerfile diff --git a/hello-seattle/hello b/amd64/hello-seattle/hello similarity index 89% rename from hello-seattle/hello rename to amd64/hello-seattle/hello index 11be0affc3a3b89615540fdcde42c5b6562b6bad..5cba74ebe76adb2a6b7da5402c81c188d28c3c47 100755 GIT binary patch delta 97 zcmX@WcYtq$0i$2x-1YnP1XbD%5}CE8Y>{eOt{dj1H3v+0Fw1UAi6& diff --git a/hello-seattle/nanoserver/Dockerfile b/amd64/hello-seattle/nanoserver/Dockerfile similarity index 100% rename from hello-seattle/nanoserver/Dockerfile rename to amd64/hello-seattle/nanoserver/Dockerfile diff --git a/hello-seattle/nanoserver/hello.txt b/amd64/hello-seattle/nanoserver/hello.txt similarity index 100% rename from hello-seattle/nanoserver/hello.txt rename to amd64/hello-seattle/nanoserver/hello.txt diff --git a/hello-world/Dockerfile b/amd64/hello-world/Dockerfile similarity index 100% rename from hello-world/Dockerfile rename to amd64/hello-world/Dockerfile diff --git a/hello-world/hello b/amd64/hello-world/hello similarity index 88% rename from hello-world/hello rename to amd64/hello-world/hello index 5812d13e4ae2d3f2c05f2c81266f76274eea63c2..ae5e70384a149c9130a6724d7451a38583bcb3ba 100755 GIT binary patch delta 97 zcmdnMw}Eei0i&O&6|_u#XWav>!z5RAOde mFg)-=1jvpu{I=f)NE;q_$qJyY(e-_MPbq+5#fE8IVB0t^?Li<6)PIG1k m2Ezj{M1brl!*Ba-fVAO(m#jdFU*2VN9pfh!Mu*9TZ07+rLLGeo diff --git a/hola-mundo/nanoserver/Dockerfile b/amd64/hola-mundo/nanoserver/Dockerfile similarity index 100% rename from hola-mundo/nanoserver/Dockerfile rename to amd64/hola-mundo/nanoserver/Dockerfile diff --git a/hola-mundo/nanoserver/hello.txt b/amd64/hola-mundo/nanoserver/hello.txt similarity index 100% rename from hola-mundo/nanoserver/hello.txt rename to amd64/hola-mundo/nanoserver/hello.txt diff --git a/arm32v5/hello-seattle/Dockerfile b/arm32v5/hello-seattle/Dockerfile new file mode 100644 index 0000000..d4ff707 --- /dev/null +++ b/arm32v5/hello-seattle/Dockerfile @@ -0,0 +1,3 @@ +FROM scratch +COPY hello / +CMD ["/hello"] diff --git a/arm32v5/hello-seattle/hello b/arm32v5/hello-seattle/hello new file mode 100755 index 0000000000000000000000000000000000000000..7f286662d5a3eef415e4d70dc006c2577e97b687 GIT binary patch literal 1696 zcma)6PjB2r6d!wc+tmE&3W_K_glQF_BC_5lM6JXDrJ}S!0t7U@Gqxw|QEZRp8MDa= z&RjqodO%27p?r->d;|`hpoh4ts3}Dv5+5M^p1lqW>VYRc&&>PtdvD$wzc1ha@V4VP ztRnWPUPd)Rer?&C~+226UW z*e^9ZSRJ;6Ju%6N&w}UuaXi(L{?kJnk?g-j_!Nh1E`U4WJ0IU;8}ELvzx%QGMs@D% zzoz#ug+JfVeub*0{`%m_65l&qy0&-d@^22D{$$!^lj#CuPZ{G^|6_4@JpBNyxQ$iwA(kKO)Pj~P24pX!s2!@LcdB${s(I_0-?xGjtKbjDY& ztz73tRSDCRQNrYAK6nQR10k!6Vop9p2df&-iAik@NONFJ6bVTKZN#EVcAiU9C#=)x*ErFFDNq$33a6|#8}xFy<6f@{l03u zfwH`83+@s&Fw%@b6Z&{QM^fWJ^i**SlBnt6Abjc|`)X=E`f;RC$(4{cWb z&+O(~_y{Qi#hlC7_SQDp8F#@s=e*Q?*}34n;=J0q=)C4!au>VIH!-?|#xp}Wsc^|*`HGW@yaPz9? zd8{R$z0T?rWUCO~T)@L;3#*K?1?U#p=|*2Wkfq0d>#~~3l+Gl*3)$VSUvm#<;!|MK zL&bit*~8moeS8y>ocJ_&-XF&k9qB(lunEZ?C&H&VWOEMO0bl#*7Q6A!`|p1J%bB0Q zzkT5|H~IFb?|%G~Lse66ZSbJacMke*?i~31n?0{L+3&K+{vu-!8NNMyqppX&wL6DP z$HVDucr6p~jGp;*GCg902dtb-VLSDElWB)frd#ZXLzw)1#O@q=LAej#i^s>ue=+v? zJ>X8Ch0WPuZ~yGxWcupS+C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>Ve$%AJWvq&*uhi$3nrE3GvB5;5Rw z{-V{0|1-P(8a_gbNHOm+rn4&>?3_R6J>fkw^Q?Etd(L~lHSfLPz34B@u+XL`66(&v zLOU7ui!zK#l_g!3u+YhoV89qiL~6j;T=pBcWKr5#Jtgdsw`6rf-ptWD!caX<-BE)zo+K vJC$a>3=72&MT2YhA~4}dSE0ZRFjVpvjI>81&Ats+W1mNpz11u*Hn@KP0qdRc literal 0 HcmV?d00001 diff --git a/arm32v7/hello-seattle/Dockerfile b/arm32v7/hello-seattle/Dockerfile new file mode 100644 index 0000000..d4ff707 --- /dev/null +++ b/arm32v7/hello-seattle/Dockerfile @@ -0,0 +1,3 @@ +FROM scratch +COPY hello / +CMD ["/hello"] diff --git a/arm32v7/hello-seattle/hello b/arm32v7/hello-seattle/hello new file mode 100755 index 0000000000000000000000000000000000000000..7b4db8192765338a0761703ab2d979a7aae41ca1 GIT binary patch literal 1648 zcmaJ>&2Ah;5boJsXE(zk|B8tqYFj>p$Q~z-u@R?Om~~(d8sJgc_YggyQK58QD0>hIO5?)Ib2v)N~N^n|f$>rOXd z;Vqfxn(x-S;F~(xll5D=h{AA3^N}oNEvy8{zqpIj_;A&G&`7?k zk=mI2jg^&oGvwDJz5_**C{J=FOAGMQip0v)J56<|kcBRzkgptbX~ev8c|NtD&!_-P zrn&1pR|VbC*MoAH!rgK)ux`8vE2-fMFu_YXZjw>BUJHRLHIU;>B^j?>Nwt$92g!Yz zI4k0uDgnc))~QRRH{jaY%J~v=QA?gUl(0kzIpU=#3i4TfQ9j1PpzyZ?JrH_8yLbd7E7K-4;i1~Q zwLEOk?M(#8ti>Z)UQTlD(x?d*CAwG+!=bJlU%4-eDo2G0O{G!*_#m~fbJSgy zBiv)z8Cj1Ue1LcS103MEL4!$15i1s4#dcYG$|5WGEsO9bgcUf&#;|ClA=>!h-3Xs% ztzu`TIiAe_oL+*C=2!4svLn14b~z5~ zG~lL0I-*4|)u@XA&HQcVA?b+PxGUI`4?(ncZ7hfm=k0o9Q<0452>@Piw*J43+hVn< NUtzb^9&1)T16u*=A()T(p8f*P3vE0N6BFO~XNJU&U@O-I7#gB9?cV=$hTrx9vxF5cx z8+Gf({sAK5%C#tTp|oq)y48ggiio@lf-C9o+<6ldDIRj(oqIlh=j-Nt_}UxeD2iA| z3+#DDHL&t{#?D(=WKT7Z?+Qg@9zz-u-WNb>~`82&d=Y+vu_6D z;rP+<`SEA>4jB7o_TAE7AHDzb?PiC~*sVMFQQ`QRKbkYWYd1z`i;v&dGsc>oS9=kQ zugbF2e9!2Lk94*#%}TsmD9bBpt(Zt|3q7^m6~ggD?G0D8b)qbVQ@ZA&X{0bvYo1Cz z)n;GS6P{^fWai4lB#w7ApU7Go;Uqx*#a*9AgR9<$M)Ez4M5g3#oowtYF@G`PyHK=g z@vKy`b^x!P$ehfB(_EJeS?M~7`Nb11t(Z5yEa&#C1(myjOv`+gtBNWNwNnOju&X`= z(xrzXWk#ZqoC{vdX`6~daUBGD)Iv@Rl@;9hnmQ+A4w45l^G>8C^#O*B(YeoLFyPv| z#)k%TVI<|EFbG&P=(q6IY+@Tj#bmPZJoC%S!$tjAtTs@i8^U2 zRg1EnmNSRk>Pli*7)7O#j;Kl~c{HBaM+i_jhbOYRnU&h- zNgFK5bhR1BV{KYrc_6B$M287Yu-c!-j(fNht=t6%rVu>v*0N-xA=-ZT%|tk7RO+3yCzJV~+au7?&RPJ| zKBL{X2JVRV5zz%OZOpI-Y3JgvB*mO)cM*{<*%4j|yAqdYX_?K5bVTc5>QN5?+Fjf3 xKGG3&aWCSVdtaE4v|BH?HVw&$z5u{W?PvJy;&xb_>L=LkbQheR-2>plcmx0d literal 0 HcmV?d00001 diff --git a/arm32v7/hola-mundo/Dockerfile b/arm32v7/hola-mundo/Dockerfile new file mode 100644 index 0000000..d4ff707 --- /dev/null +++ b/arm32v7/hola-mundo/Dockerfile @@ -0,0 +1,3 @@ +FROM scratch +COPY hello / +CMD ["/hello"] diff --git a/arm32v7/hola-mundo/hello b/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_RpMQT*u^NgFxs^R0lmd4M1e!utevsYUC z{qt{JsMl)5wL1Bl;B2ebu&Sab?=8WoQO*kaWx41iv52Cd z0LxoP3-en?&)I>KCkr)k(&5HHkKeU2#mM4 z&;QySO-;c4Q#@CflWqqPGX@I8gN4UT%xHd3|maazW;WNMOvo7 zB{N!NcslU(wBZDxE{}@P=nvR#Oa8E+OUn=-)*4R8{Ct=S69q-EAQaiW?_UtI!14{2 zbyHv%y(JN6;P~A{CAxwKq^iPs-hn#ijpDLn00aK)ZykR>wfCB2Y~xt%smG4v)asuG zdHMc>2Mbm+>P8HV7#J}yVqnC;h=CCUBL+qc{5u2gK6;>Kpknx=4|fL=2v~$J=%)I>0RL~{2$V&5ywV?yK-VQ8f3Cv4u)#9~I(ZKg (@tianon), Joseph Ferguson (@yosifkit) GitRepo: https://github.com/docker-library/hello-world.git +GitCommit: $generateCommit EOH -commit="$(dirCommit "$image")" +# prints "$2$1$3$1...$N" +join() { + local sep="$1"; shift + local out; printf -v out "${sep//%/%%}%s" "$@" + echo "${out#$sep}" +} + +arches=( *"/$image/hello" ) +arches=( "${arches[@]%"/$image/hello"}" ) echo cat <<-EOE Tags: latest - GitCommit: $commit - Directory: $image + Architectures: $(join ', ' "${arches[@]}") EOE +for arch in "${arches[@]}"; do + commit="$(dirCommit "$arch/$image")" + cat <<-EOE + $arch-GitCommit: $commit + $arch-Directory: $arch/$image + EOE +done -if [ -d "$image/nanoserver" ]; then - commit="$(dirCommit "$image/nanoserver")" +winArches=( *"/$image/nanoserver/hello.txt" ) +winArches=( "${winArches[@]%"/$image/nanoserver/hello.txt"}" ) +if [ "${#winArches[@]}" -gt 0 ]; then echo cat <<-EOE Tags: nanoserver - GitCommit: $commit - Directory: $image/nanoserver + Architectures: $(join ', ' "${winArches[@]/#/windows-}") + EOE + for arch in "${winArches[@]}"; do + commit="$(dirCommit "$arch/$image/nanoserver")" + cat <<-EOE + windows-$arch-GitCommit: $commit + windows-$arch-Directory: $arch/$image/nanoserver + EOE + done + cat <<-EOE Constraints: nanoserver EOE fi diff --git a/hello-seattle/greeting.txt b/greetings/hello-seattle.txt similarity index 100% rename from hello-seattle/greeting.txt rename to greetings/hello-seattle.txt diff --git a/hello-world/greeting.txt b/greetings/hello-world.txt similarity index 100% rename from hello-world/greeting.txt rename to greetings/hello-world.txt diff --git a/hola-mundo/greeting.txt b/greetings/hola-mundo.txt similarity index 100% rename from hola-mundo/greeting.txt rename to greetings/hola-mundo.txt diff --git a/i386/hello-seattle/Dockerfile b/i386/hello-seattle/Dockerfile new file mode 100644 index 0000000..d4ff707 --- /dev/null +++ b/i386/hello-seattle/Dockerfile @@ -0,0 +1,3 @@ +FROM scratch +COPY hello / +CMD ["/hello"] diff --git a/i386/hello-world/Dockerfile b/i386/hello-world/Dockerfile new file mode 100644 index 0000000..d4ff707 --- /dev/null +++ b/i386/hello-world/Dockerfile @@ -0,0 +1,3 @@ +FROM scratch +COPY hello / +CMD ["/hello"] diff --git a/i386/hola-mundo/Dockerfile b/i386/hola-mundo/Dockerfile new file mode 100644 index 0000000..d4ff707 --- /dev/null +++ b/i386/hola-mundo/Dockerfile @@ -0,0 +1,3 @@ +FROM scratch +COPY hello / +CMD ["/hello"] diff --git a/ppc64le/hello-seattle/Dockerfile b/ppc64le/hello-seattle/Dockerfile new file mode 100644 index 0000000..d4ff707 --- /dev/null +++ b/ppc64le/hello-seattle/Dockerfile @@ -0,0 +1,3 @@ +FROM scratch +COPY hello / +CMD ["/hello"] diff --git a/ppc64le/hello-seattle/hello b/ppc64le/hello-seattle/hello new file mode 100755 index 0000000000000000000000000000000000000000..aeae47667ccbbbb3df43474d46eb88d574c33aa6 GIT binary patch literal 65872 zcmeIy&u<$=6u|MZ6O!N-6eN(43e~ja&4zg3(|L__1m49_h#m^n_PSI z-05niqRLiP&nfqGyQ1b@--`Q@_RctuRS7Gqsb=JNPR(X>pU8*G-z-lave=r*yUVDu zjQlqnD(b3nCC@A3Tv4rzW!|*(yKB4HvcxQ}j0;6x8Qom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Wdo$$4O#*8*aB6jZ3lKG?7U>Yoy4dy3KMmNsX_{h|wFdY-G#jr`8P9w;TFMOJ9Gv%PR6RrcP6^HFdG2 z)DZ?Y-;vDA->5aoAc(xMcw08v)@eL2^0MSr3}V@iH|PfPy0f(D6149{?r2)V2dEQhu8{iU*6o3?&aT7K5sd&Ix8l2y|mwGeAIV`%%!BHm)UsWJ`eZ#Y{)0z`l4R3 zw5uoD8;N=Ndd{rN0)1=c6IogD!#L};ip5%fJXmQoPQ^))YewE+7>cl~7W9lKg+B?> zz)s~$W;&g2qD?u+N|u^rGm{*tSNxs0|3R+RKE0@BM{BhMdyD^2FG`=g?*2WQxW7yF z@jm_B+Gp$g)Y_cboh``uFO^6p48|JX6H#ccHo|V^iXE{{FclUt-?c<-98F&VNe=T;EJ} zut}|WKa(P(>aOy4KcA2RxBkOz?#kc2UOrjoSN)IWR*Sgta{aZbK6mTpPq%*nW1XiZ literal 0 HcmV?d00001 diff --git a/ppc64le/hola-mundo/Dockerfile b/ppc64le/hola-mundo/Dockerfile new file mode 100644 index 0000000..d4ff707 --- /dev/null +++ b/ppc64le/hola-mundo/Dockerfile @@ -0,0 +1,3 @@ +FROM scratch +COPY hello / +CMD ["/hello"] diff --git a/ppc64le/hola-mundo/hello b/ppc64le/hola-mundo/hello new file mode 100755 index 0000000000000000000000000000000000000000..cff75bad8e9caa58926b31e0b2f3061e35fadd63 GIT binary patch literal 65872 zcmeIy&u)MvwmV^VrkQ!i zZp}go96i`SL5y(r>W!EfZ4mIgU_G5Nm9>@)Me@AJIx`<<&|-+$Sb3p>)Nzj+5Nw)mrW|?jKvRs zv)$qd<&>w!^6(cW@2TsR0^1I`Pu3BgP_tIMB^=N;tZ~kqybL50l{?2IBYL1;prsu8p-L2Iq z@O0Pcm8f&Y#Al*VpS`S)9bJ4~A3p8H9TP;McjRF0QqNCx-z15*ZgkR%HWO`op4D4X z8f!mHtZc@!zNC8_8^()eIMQvSH>3E9AFk_86vw7xgRMrbb}7>9CN!~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lx^g_$`Kt z=i0I1W`S*A59p9Zr2y&XO2%|S=mPEH5|A$O_11)kYVW3E*q*o7u|c2|F3Hl87s=dr z^k$AH<0aePkg1Lp`)=HdP+>v~ec=N5(=ZFwNIW95(QuJ8agL=t6KOL?4DgCijouDs z-2RXm`!mK1Q%~I~-^B%}UmOe`lKD2<_+k9}Gv8U?PJA=@wf)uEFQ>kk{(R=zOt)6s zoY4`4vjzVx@Yg7)ASVmZNn8%*BvJ{dndD9*4qAbh~U<4ik?H? z$g&FI|MIf{pf{PQMpN~UW5pp7&1*KCt9O|cFJV-_isF4f`R@$>KYx6f z_phDP_KJ^P9`UDT;aBRY50AxY<6V+Lqvw5GroD?e PGMuJi{2QnB!+hDlW{0Tg literal 0 HcmV?d00001 diff --git a/s390x/hello-world/Dockerfile b/s390x/hello-world/Dockerfile new file mode 100644 index 0000000..d4ff707 --- /dev/null +++ b/s390x/hello-world/Dockerfile @@ -0,0 +1,3 @@ +FROM scratch +COPY hello / +CMD ["/hello"] diff --git a/s390x/hello-world/hello b/s390x/hello-world/hello new file mode 100755 index 0000000000000000000000000000000000000000..ecc42bc7656aa86191de3c870da531c8364b3a98 GIT binary patch literal 1968 zcmbtV&2QX96d!M#I&qt@0@Mo#CSipDB~D5!#MfaZwqcQ~rqC1#35m?wvui81XJwDs zq!)7H`{Trg6XLR0gb-41Iq`QOttupP=tiozP<8pujJ?@by&#@6^Jd=1@4b0%JpSbJ zm91LMB2%i7^H^(vMXYuyZyG*7*1SnxB{pdihn&G)+0GlinJcu4L;bVSRJ^XXb~(T- ziU~j#1)Fj#8)^@#xbkr@6bBhRi%`9*xZaqlv?F#PZ@&wX%J;vJN>pJyi81%~)f?o` z-PZZ%|4ep=AIz;DH6iW|UnKU?ZLF4| zBiLETcTVb%-G$6{oMSQGB#m1(d3Hp`3&d95qdLmm(0iqM9OF5ROBk0i-XHCrG>JXx zpR|d+bU3OXZjzN@i_E)Zc$e6%`k^}-1HsnV_Hc1*-C7~^=vPEsbnasYS;TRc>Z5v{ z68o2JvUz+FMO?z_!V|04RyL98Wa8YP7`o>;ZkxxkpxsO)v?csKo~^h$VU*K^=Q-m`}ylGz2MOuC`?+^k0YK+fTxoAk_XzU)CG(uBK2JQ z@&hhLO#4L~m-efnI_^3$je}JhCF+Fw>?(s2tX*_~bn#J0e#UW-fHIo$fk`F8;VKB! z$UqLl$PZ~&q^fec32*|?)6X|QdbI) ztdJs6*F#;OF0O!*rGW{p@KEh;#;5Ihr-cBal(-@r8-6T`z%#)-UnCo@yCpK?%lBE* zk5OTT76qIE_~R&#L5 zKRBtP?h)!t%Q}{WI$OABvN!r{FvU!Y?pFtR;#?-n3pn1yaTUiJj<5PVCo9bCw@)^h zIdjmj9@N=fca=@rtow+WtJMR$KR^UC$2Pmu1LNKtgWeyw`-TiTcmh_XyDO59WDINDaJjzxHeCFW zC$0!(%rDK^TYiv2B+`_(1f;&~q@aARU|(hl1aYc(7;+V0IB&NFPtYu(A)q6Z-5_p( zE0aXHD%^K$drLw~#3JEJAjm0htw;hxVSuz6fWGIngZd?rMzp`C?c;Xm(V2^OO)_T)SS5go9Z$Y>mEBWobgm1hCD ziNJGsz#$eLok@UaD z%TeD*(-PtT^79BlZ!%GZrt%%f6`)A8pxJ0H-(^y~j-&il /dev/null - docker build -t hello-world:"test-$d" "$d" - docker run --rm hello-world:"test-$d" + docker build -t hello-world:"test-$b" "$d" + docker run --rm hello-world:"test-$b" done -ls -l */nanoserver/hello.txt || : +ls -lh */*/{hello,nanoserver/hello.txt} || :