diff --git a/.circleci/config.yml b/.circleci/config.yml index 1b5a25c2..d24f94cc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -86,7 +86,9 @@ jobs: paths: - modules push_docker_image: - machine: true + machine: + image: ubuntu-2004:202107-02 + resource_class: large steps: - checkout - run: diff --git a/ci/do_ci.sh b/ci/do_ci.sh index 39761c75..85e13a04 100755 --- a/ci/do_ci.sh +++ b/ci/do_ci.sh @@ -25,19 +25,19 @@ elif [[ "$1" == "module.binaries" ]]; then ./ci/build_module_binaries.sh exit 0 elif [[ "$1" == "push_docker_image" ]]; then + # setup docker for multi-arch + export DOCKER_BUILDKIT=1 + docker run --privileged --rm tonistiigi/binfmt --install all + docker buildx create --name nginx-opentracing-builder + echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin VERSION_TAG="$(git describe --abbrev=0 --tags)" VERSION="${VERSION_TAG/v/}" - # nginx - docker build -t opentracing/nginx-opentracing . - docker tag opentracing/nginx-opentracing opentracing/nginx-opentracing:${VERSION} - docker push opentracing/nginx-opentracing:${VERSION} - docker tag opentracing/nginx-opentracing opentracing/nginx-opentracing:latest - docker push opentracing/nginx-opentracing:latest - NGINX_VERSION="$(docker inspect --format '{{json .Config.Env }}' opentracing/nginx-opentracing | awk -F, '{ sub(/^.*NGINX_VERSION=/, ""); print substr($1, 1, length($1)-1)}')" - docker tag opentracing/nginx-opentracing opentracing/nginx-opentracing:nginx-${NGINX_VERSION} - docker push opentracing/nginx-opentracing:nginx-${NGINX_VERSION} + # nginx + docker pull nginx:latest + NGINX_VERSION="$(docker inspect --format '{{json .Config.Env }}' nginx:latest | awk -F, '{ sub(/^.*NGINX_VERSION=/, ""); print substr($1, 1, length($1)-1)}')" + docker buildx build --builder nginx-opentracing-builder --progress plain --push --platform linux/arm64,linux/amd64,linux/ppc64le -t opentracing-contrib/nginx-opentracing:latest -t opentracing/nginx-opentracing:${VERSION} -t opentracing/nginx-opentracing:nginx-${NGINX_VERSION} . # openresty docker build -t opentracing/openresty -f Dockerfile-openresty .