Merge pull request #7 from StefanScherer/use-docker-manifest-edge

Use docker manifest command from edge channel
pull/8/head 1.5.4
Stefan Scherer 6 years ago committed by GitHub
commit b0cfe5dba7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,5 +1,5 @@
ARG golang=golang:nanoserver
ARG target=microsoft/nanoserver:10.0.14393.2007
ARG target=microsoft/nanoserver:10.0.14393.2068
FROM $golang AS build

@ -54,6 +54,6 @@ Image: stefanscherer/whoami
- linux/amd64
- linux/arm/v6
- linux/arm64/v8
- windows/amd64:10.0.14393.2007
- windows/amd64:10.0.16299.19
- windows/amd64:10.0.14393.2068
- windows/amd64:10.0.16299.248
```

@ -17,4 +17,4 @@ npm install -g rebase-docker-image
rebase-docker-image `
stefanscherer/whoami:windows-amd64-$env:APPVEYOR_REPO_TAG_NAME `
-t stefanscherer/whoami:windows-amd64-$env:APPVEYOR_REPO_TAG_NAME-1709 `
-b microsoft/nanoserver:1709_KB4056892
-b microsoft/nanoserver:1709

@ -3,9 +3,15 @@ set -e
docker version
uname -a
echo "Updating Docker engine to have multi-stage builds"
echo "Updating Docker engine to have multi-stage builds and manifest command"
sudo service docker stop
curl -fsSL https://get.docker.com/ | sudo sh
echo "Enabling docker client experimental features"
mkdir -p ~/.docker
echo '{ "experimental": "enabled" }' > ~/.docker/config.json
docker version
if [ -d tmp ]; then

@ -30,33 +30,25 @@ if [ "$ARCH" == "amd64" ]; then
done
set -e
echo "Downloading docker client with manifest command"
wget https://6582-88013053-gh.circle-artifacts.com/1/work/build/docker-linux-amd64
mv docker-linux-amd64 docker
chmod +x docker
./docker version
set -x
echo "Pushing manifest $image:$TRAVIS_TAG"
./docker -D manifest create "$image:$TRAVIS_TAG" \
docker -D manifest create "$image:$TRAVIS_TAG" \
"$image:linux-amd64-$TRAVIS_TAG" \
"$image:linux-arm-$TRAVIS_TAG" \
"$image:linux-arm64-$TRAVIS_TAG" \
"$image:windows-amd64-$TRAVIS_TAG" \
"$image:windows-amd64-$TRAVIS_TAG-1709"
./docker manifest annotate "$image:$TRAVIS_TAG" "$image:linux-arm-$TRAVIS_TAG" --os linux --arch arm --variant v6
./docker manifest annotate "$image:$TRAVIS_TAG" "$image:linux-arm64-$TRAVIS_TAG" --os linux --arch arm64 --variant v8
./docker manifest push "$image:$TRAVIS_TAG"
docker manifest annotate "$image:$TRAVIS_TAG" "$image:linux-arm-$TRAVIS_TAG" --os linux --arch arm --variant v6
docker manifest annotate "$image:$TRAVIS_TAG" "$image:linux-arm64-$TRAVIS_TAG" --os linux --arch arm64 --variant v8
docker manifest push "$image:$TRAVIS_TAG"
echo "Pushing manifest $image:latest"
./docker -D manifest create "$image:latest" \
docker -D manifest create "$image:latest" \
"$image:linux-amd64-$TRAVIS_TAG" \
"$image:linux-arm-$TRAVIS_TAG" \
"$image:linux-arm64-$TRAVIS_TAG" \
"$image:windows-amd64-$TRAVIS_TAG" \
"$image:windows-amd64-$TRAVIS_TAG-1709"
./docker manifest annotate "$image:latest" "$image:linux-arm-$TRAVIS_TAG" --os linux --arch arm --variant v6
./docker manifest annotate "$image:latest" "$image:linux-arm64-$TRAVIS_TAG" --os linux --arch arm64 --variant v8
./docker manifest push "$image:latest"
docker manifest annotate "$image:latest" "$image:linux-arm-$TRAVIS_TAG" --os linux --arch arm --variant v6
docker manifest annotate "$image:latest" "$image:linux-arm64-$TRAVIS_TAG" --os linux --arch arm64 --variant v8
docker manifest push "$image:latest"
fi

Loading…
Cancel
Save