3 # All rights reserved. This program and the accompanying materials
4 # are made available under the terms of the Apache License, Version 2.0
5 # which accompanies this distribution, and is available at
6 # http://www.apache.org/licenses/LICENSE-2.0
17 build_opts=(--pull=true --no-cache --force-rm=true)
19 for arch in ${arch};do
20 if [[ ${arch} == arm64 ]]; then
21 find . -name Dockerfile -exec sed -i \
22 -e "s|alpine:3.9|multiarch/alpine:arm64-v3.9|g" {} +
23 elif [[ ${arch} == arm ]]; then
24 find . -name Dockerfile -exec sed -i \
25 -e "s|alpine:3.9|multiarch/alpine:armhf-v3.9|g" {} +
27 (cd docker && docker build "${build_opts[@]}" \
28 -t "${repo}/${image}:${arch}-${tag}" .)
29 docker push "${repo}/${image}:${arch}-${tag}"
31 (sudo docker rmi "${repo}/${image}:${arch}-${tag}"|| true)
32 find . -name Dockerfile -exec git checkout \{\} +;