Created
October 19, 2015 17:21
-
-
Save samuelkarp/4cdb98e0010a23bd606e to your computer and use it in GitHub Desktop.
Docker 1.9.0-rc1 sha256 digest repro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo service docker stop | |
sudo rm -rf /var/lib/docker | |
sudo rm -rf ./bundles/ .gopath | |
AUTO_GOPATH=1 ./hack/make.sh dynbinary || exit 125 | |
sudo cp bundles/latest/dynbinary/docker /usr/bin/docker | |
sudo cp bundles/latest/dynbinary/dockerinit /usr/bin/dockerinit | |
sudo service docker start | |
./repro.sh | |
ecode=$? | |
exit $ecode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Run a local registry on the 'well known' port 51670 if it is not running. | |
# Also push images we will need to it. | |
set -e | |
set -x | |
# registry:2 from 2015-09-15 | |
REGISTRY_IMAGE="registry@sha256:b7de4f6226df56d18f83296efa77dedf9bb72e79838167be0484a3078836fab2" | |
REGISTRY_CONTAINER_NAME=test-registry | |
status=$(docker inspect -f "{{ .State.Running }}" "$REGISTRY_CONTAINER_NAME") || true | |
if [[ "$status" == "false" ]]; then | |
docker rm -f "$REGISTRY_CONTAINER_NAME" | |
fi | |
# This will fail if we already have one running, but that's fine. We'll see it | |
# running and push our image to it to make sure it's there | |
if [[ "$status" != "true" ]]; then | |
docker run -d --name="$REGISTRY_CONTAINER_NAME" -e SETTINGS_FLAVOR=local -p "127.0.0.1:51670:5000" "${REGISTRY_IMAGE}" | |
fi | |
# Wait for it to be started which might include downloading the image | |
status="false" | |
for try in $(seq 1 300); do | |
status=$(docker inspect -f "{{ .State.Running }}" $REGISTRY_CONTAINER_NAME) | |
if [[ "$status" == "true" ]]; then | |
break | |
fi | |
sleep 1 | |
done | |
if [[ "$status" != "true" ]]; then | |
echo "Unable to start test registry" | |
exit 1 | |
fi | |
sleep 2 | |
BUSYBOX_IMAGE="busybox@sha256:ced99ae82473e7dea723e6c467f409ed8f051bda04760e07fd5f476638c33507" | |
docker pull ${BUSYBOX_IMAGE} | |
docker tag -f ${BUSYBOX_IMAGE} "127.0.0.1:51670/busybox:latest" | |
docker push "127.0.0.1:51670/busybox:latest" || exit 125 | |
docker pull ${BUSYBOX_IMAGE} # fails here |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment