Fixes for ppc64le and 390x frozen-images
Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
This commit is contained in:
parent
adb19755e1
commit
03fc212b6d
|
@ -17,6 +17,7 @@ RUN apt-get update && apt-get install -y \
|
||||||
curl \
|
curl \
|
||||||
git \
|
git \
|
||||||
iptables \
|
iptables \
|
||||||
|
jq \
|
||||||
net-tools \
|
net-tools \
|
||||||
libapparmor-dev \
|
libapparmor-dev \
|
||||||
libcap-dev \
|
libcap-dev \
|
||||||
|
@ -77,8 +78,8 @@ WORKDIR /go/src/github.com/docker/docker
|
||||||
ENV DOCKER_BUILDTAGS apparmor selinux
|
ENV DOCKER_BUILDTAGS apparmor selinux
|
||||||
|
|
||||||
ENV IMAGEREPO ppc64le
|
ENV IMAGEREPO ppc64le
|
||||||
COPY contrib/download-frozen-image.sh /go/src/github.com/docker/docker/contrib/
|
COPY contrib/download-frozen-image-v2.sh /go/src/github.com/docker/docker/contrib/
|
||||||
RUN ./contrib/download-frozen-image.sh /docker-frozen-images \
|
RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images \
|
||||||
$IMAGEREPO/busybox:latest \
|
$IMAGEREPO/busybox:latest \
|
||||||
$IMAGEREPO/hello-world:frozen
|
$IMAGEREPO/hello-world:frozen
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,7 @@ RUN apt-get update && apt-get install -y \
|
||||||
curl \
|
curl \
|
||||||
git \
|
git \
|
||||||
iptables \
|
iptables \
|
||||||
|
jq \
|
||||||
net-tools \
|
net-tools \
|
||||||
libapparmor-dev \
|
libapparmor-dev \
|
||||||
libcap-dev \
|
libcap-dev \
|
||||||
|
@ -76,8 +77,8 @@ WORKDIR /go/src/github.com/docker/docker
|
||||||
ENV DOCKER_BUILDTAGS apparmor selinux
|
ENV DOCKER_BUILDTAGS apparmor selinux
|
||||||
|
|
||||||
ENV IMAGEREPO s390x
|
ENV IMAGEREPO s390x
|
||||||
COPY contrib/download-frozen-image.sh /go/src/github.com/docker/docker/contrib/
|
COPY contrib/download-frozen-image-v2.sh /go/src/github.com/docker/docker/contrib/
|
||||||
RUN ./contrib/download-frozen-image.sh /docker-frozen-images \
|
RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images \
|
||||||
$IMAGEREPO/busybox:latest \
|
$IMAGEREPO/busybox:latest \
|
||||||
$IMAGEREPO/hello-world:frozen
|
$IMAGEREPO/hello-world:frozen
|
||||||
|
|
||||||
|
|
|
@ -1,21 +1,37 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# this list should match roughly what's in the Dockerfile (minus the explicit image IDs, of course)
|
# image lists for different archs that should match what's in the Dockerfile (minus the explicit images IDs)
|
||||||
images=(
|
case "$DOCKER_ENGINE_OSARCH" in
|
||||||
busybox:latest
|
linux/arm)
|
||||||
hello-world:latest
|
images=(
|
||||||
jess/unshare:latest
|
hypriot/armhf-busybox@ea0800bb83571c585c5652b53668e76b29c7c0eef719892f9d0a48607984f9e1
|
||||||
)
|
hypriot/armhf-hello-world@508c59a4f8b23c77bbcf43296c3f580873dc7eecb1f0d680cea3067e221fd4c2
|
||||||
|
hypriot/armhf-unshare@3f1db65f8bbabc743fd739cf7145a56c35b2a0979ae3174e9d79b7fa4b00fca1
|
||||||
# on ARM we need images that work for the ARM architecture
|
)
|
||||||
if [ "$DOCKER_ENGINE_OSARCH" = "linux/arm" ]; then
|
;;
|
||||||
images=(
|
linux/ppc64le)
|
||||||
hypriot/armhf-busybox@ea0800bb83571c585c5652b53668e76b29c7c0eef719892f9d0a48607984f9e1
|
images=(
|
||||||
hypriot/armhf-hello-world@508c59a4f8b23c77bbcf43296c3f580873dc7eecb1f0d680cea3067e221fd4c2
|
ppc64le/busybox:latest
|
||||||
hypriot/armhf-unshare@3f1db65f8bbabc743fd739cf7145a56c35b2a0979ae3174e9d79b7fa4b00fca1
|
ppc64le/hello-world:frozen
|
||||||
)
|
ppc64le/unshare:latest
|
||||||
fi
|
)
|
||||||
|
;;
|
||||||
|
linux/s390x)
|
||||||
|
images=(
|
||||||
|
s390x/busybox:latest
|
||||||
|
s390x/hello-world:frozen
|
||||||
|
s390x/unshare:latest
|
||||||
|
)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
images=(
|
||||||
|
busybox:latest
|
||||||
|
hello-world:latest
|
||||||
|
jess/unshare:latest
|
||||||
|
)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
if ! docker inspect "${images[@]}" &> /dev/null; then
|
if ! docker inspect "${images[@]}" &> /dev/null; then
|
||||||
hardCodedDir='/docker-frozen-images'
|
hardCodedDir='/docker-frozen-images'
|
||||||
|
@ -46,16 +62,34 @@ if ! docker inspect "${images[@]}" &> /dev/null; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$DOCKER_ENGINE_OSARCH" = "linux/arm" ]; then
|
# tag images to ensure that all integrations work with the defined image names
|
||||||
# tag images to ensure that all integrations work with the defined image names
|
# then remove original tags as these make problems with later tests (e.g., TestInspectApiImageResponse)
|
||||||
docker tag hypriot/armhf-busybox:latest busybox:latest
|
case "$DOCKER_ENGINE_OSARCH" in
|
||||||
docker tag hypriot/armhf-hello-world:latest hello-world:frozen
|
linux/arm)
|
||||||
docker tag hypriot/armhf-unshare:latest jess/unshare:latest
|
docker tag hypriot/armhf-busybox:latest busybox:latest
|
||||||
|
docker tag hypriot/armhf-hello-world:latest hello-world:frozen
|
||||||
# remove orignal tags as these make problems with later tests: TestInspectApiImageResponse
|
docker tag hypriot/armhf-unshare:latest jess/unshare:latest
|
||||||
docker rmi hypriot/armhf-busybox:latest
|
docker rmi hypriot/armhf-busybox:latest
|
||||||
docker rmi hypriot/armhf-hello-world:latest
|
docker rmi hypriot/armhf-hello-world:latest
|
||||||
docker rmi hypriot/armhf-unshare:latest
|
docker rmi hypriot/armhf-unshare:latest
|
||||||
else
|
;;
|
||||||
docker tag hello-world:latest hello-world:frozen
|
linux/ppc64le)
|
||||||
fi
|
docker tag ppc64le/busybox:latest busybox:latest
|
||||||
|
docker tag ppc64le/hello-world:frozen hello-world:frozen
|
||||||
|
docker tag ppc64le/unshare:latest jess/unshare:latest
|
||||||
|
docker rmi ppc64le/busybox:latest
|
||||||
|
docker rmi ppc64le/hello-world:frozen
|
||||||
|
docker rmi ppc64le/unshare:latest
|
||||||
|
;;
|
||||||
|
linux/s390x)
|
||||||
|
docker tag s390x/busybox:latest busybox:latest
|
||||||
|
docker tag s390x/hello-world:frozen hello-world:frozen
|
||||||
|
docker tag s390x/unshare:latest jess/unshare:latest
|
||||||
|
docker rmi s390x/busybox:latest
|
||||||
|
docker rmi s390x/hello-world:frozen
|
||||||
|
docker rmi s390x/unshare:latest
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
docker tag hello-world:latest hello-world:frozen
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
for image in `docker images | awk '{print $1}'`; do
|
|
||||||
if ( [ -z "${image##$IMAGEREPO/busybox}" ] ); then
|
|
||||||
docker tag $image busybox:latest
|
|
||||||
docker rmi $image
|
|
||||||
elif ( [ -z "${image##$IMAGEREPO/hello-world}" ] ); then
|
|
||||||
docker tag $image:frozen hello-world:frozen
|
|
||||||
docker rmi $image:frozen
|
|
||||||
fi
|
|
||||||
done
|
|
|
@ -2,5 +2,4 @@
|
||||||
|
|
||||||
bundle .ensure-emptyfs
|
bundle .ensure-emptyfs
|
||||||
bundle .ensure-frozen-images
|
bundle .ensure-frozen-images
|
||||||
bundle .ensure-images
|
|
||||||
bundle .ensure-httpserver
|
bundle .ensure-httpserver
|
||||||
|
|
Loading…
Reference in New Issue