Skip to content

Commit

Permalink
Add Docker images for arm64 and ppc64le
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacome committed Aug 30, 2021
1 parent 6cef7ff commit ab0c48a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
4 changes: 3 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ jobs:
paths:
- modules
push_docker_image:
machine: true
machine:
image: ubuntu-2004:202107-02
resource_class: large
steps:
- checkout
- run:
Expand Down
18 changes: 9 additions & 9 deletions ci/do_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 .
Expand Down

0 comments on commit ab0c48a

Please sign in to comment.