2019-02-13 04:35:27 +01:00
|
|
|
version: 2
|
|
|
|
jobs:
|
2019-02-20 04:45:55 +01:00
|
|
|
# Define in CircleCi Project Variables: $DOCKERHUB_REPO, $DOCKERHUB_USER, $DOCKERHUB_PASS
|
|
|
|
# Publish jobs require those variables
|
|
|
|
publish_docker_linuxamd64:
|
|
|
|
machine:
|
2019-10-16 03:16:20 +02:00
|
|
|
docker_layer_caching: false
|
2019-02-20 04:45:55 +01:00
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run:
|
|
|
|
command: |
|
2019-02-20 05:15:23 +01:00
|
|
|
LATEST_TAG="${CIRCLE_TAG:1}"
|
|
|
|
DOCKERHUB_DESTINATION="$DOCKERHUB_REPO:$LATEST_TAG-amd64"
|
2021-12-30 00:08:41 +01:00
|
|
|
DOCKERHUB_DOCKERFILE="dockerfiles/Dockerfile"
|
2019-02-20 04:45:55 +01:00
|
|
|
sudo docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS
|
2019-02-20 05:15:23 +01:00
|
|
|
sudo docker build --pull -t "$DOCKERHUB_DESTINATION" -f "$DOCKERHUB_DOCKERFILE" .
|
|
|
|
sudo docker push "$DOCKERHUB_DESTINATION"
|
2021-12-30 00:08:41 +01:00
|
|
|
no_output_timeout: 25m
|
2019-02-13 04:35:27 +01:00
|
|
|
|
2019-02-20 04:45:55 +01:00
|
|
|
publish_docker_linuxarm32v7:
|
2019-02-13 04:35:27 +01:00
|
|
|
machine:
|
2019-10-16 03:16:20 +02:00
|
|
|
docker_layer_caching: false
|
2019-02-13 04:35:27 +01:00
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run:
|
|
|
|
command: |
|
2019-02-20 04:45:55 +01:00
|
|
|
sudo docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
2019-02-20 05:15:23 +01:00
|
|
|
LATEST_TAG="${CIRCLE_TAG:1}"
|
|
|
|
DOCKERHUB_DESTINATION="$DOCKERHUB_REPO:$LATEST_TAG-arm32v7"
|
2021-12-30 00:08:41 +01:00
|
|
|
DOCKERHUB_DOCKERFILE="dockerfiles/Dockerfile.arm32v7"
|
2019-02-20 04:45:55 +01:00
|
|
|
sudo docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS
|
2019-02-20 05:15:23 +01:00
|
|
|
sudo docker build --pull -t "$DOCKERHUB_DESTINATION" -f "$DOCKERHUB_DOCKERFILE" .
|
|
|
|
sudo docker push "$DOCKERHUB_DESTINATION"
|
2021-12-30 00:08:41 +01:00
|
|
|
no_output_timeout: 25m
|
2019-02-20 04:45:55 +01:00
|
|
|
|
2019-08-08 03:53:54 +02:00
|
|
|
publish_docker_linuxarm64v8:
|
|
|
|
machine:
|
2019-10-16 03:16:20 +02:00
|
|
|
docker_layer_caching: false
|
2019-08-08 03:53:54 +02:00
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run:
|
|
|
|
command: |
|
|
|
|
sudo docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
|
|
|
LATEST_TAG="${CIRCLE_TAG:1}"
|
|
|
|
DOCKERHUB_DESTINATION="$DOCKERHUB_REPO:$LATEST_TAG-arm64v8"
|
2021-12-30 00:08:41 +01:00
|
|
|
DOCKERHUB_DOCKERFILE="dockerfiles/Dockerfile.arm64v8"
|
2019-08-08 03:53:54 +02:00
|
|
|
sudo docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS
|
|
|
|
sudo docker build --pull -t "$DOCKERHUB_DESTINATION" -f "$DOCKERHUB_DOCKERFILE" .
|
|
|
|
sudo docker push "$DOCKERHUB_DESTINATION"
|
2021-12-30 00:08:41 +01:00
|
|
|
no_output_timeout: 25m
|
2019-08-08 03:53:54 +02:00
|
|
|
|
2022-08-10 08:27:55 +02:00
|
|
|
publish_docker_multiarch:
|
|
|
|
machine:
|
|
|
|
enabled: true
|
|
|
|
image: ubuntu-2004:2022.07.1
|
|
|
|
steps:
|
|
|
|
- run:
|
|
|
|
command: |
|
|
|
|
# Turn on Experimental features
|
|
|
|
LATEST_TAG="${CIRCLE_TAG:1}"
|
2022-08-10 09:00:51 +02:00
|
|
|
sudo mkdir ./.docker
|
|
|
|
sudo sh -c 'echo "{ \"experimental\": \"enabled\" }" >> ./.docker/config.json'
|
2022-08-10 08:27:55 +02:00
|
|
|
#
|
|
|
|
sudo docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS
|
|
|
|
#
|
|
|
|
sudo docker manifest create --amend "$DOCKERHUB_REPO:$LATEST_TAG" "$DOCKERHUB_REPO:$LATEST_TAG-amd64" "$DOCKERHUB_REPO:$LATEST_TAG-arm32v7" "$DOCKERHUB_REPO:$LATEST_TAG-arm64v8"
|
|
|
|
sudo docker manifest annotate "$DOCKERHUB_REPO:$LATEST_TAG" "$DOCKERHUB_REPO:$LATEST_TAG-amd64" --os linux --arch amd64
|
|
|
|
sudo docker manifest annotate "$DOCKERHUB_REPO:$LATEST_TAG" "$DOCKERHUB_REPO:$LATEST_TAG-arm32v7" --os linux --arch arm --variant v7
|
|
|
|
sudo docker manifest annotate "$DOCKERHUB_REPO:$LATEST_TAG" "$DOCKERHUB_REPO:$LATEST_TAG-arm64v8" --os linux --arch arm64 --variant v8
|
|
|
|
sudo docker manifest push "$DOCKERHUB_REPO:$LATEST_TAG" -p
|
|
|
|
no_output_timeout: 25m
|
|
|
|
|
2019-02-13 04:35:27 +01:00
|
|
|
workflows:
|
|
|
|
version: 2
|
|
|
|
publish:
|
|
|
|
jobs:
|
2019-02-20 04:45:55 +01:00
|
|
|
- publish_docker_linuxamd64:
|
|
|
|
filters:
|
|
|
|
branches:
|
|
|
|
ignore: /.*/
|
|
|
|
tags:
|
2020-01-22 15:33:33 +01:00
|
|
|
only: /v(?:(?<major>(?:0|[1-9](?:(?:0|[1-9])+)*))[.](?<minor>(?:0|[1-9](?:(?:0|[1-9])+)*))[.](?<patch>(?:0|[1-9](?:(?:0|[1-9])+)*))(?:-(?:([A-Za-z1-9])*))?)$/
|
2019-02-20 04:45:55 +01:00
|
|
|
- publish_docker_linuxarm32v7:
|
|
|
|
filters:
|
|
|
|
branches:
|
|
|
|
ignore: /.*/
|
|
|
|
tags:
|
2020-01-22 15:33:33 +01:00
|
|
|
only: /v(?:(?<major>(?:0|[1-9](?:(?:0|[1-9])+)*))[.](?<minor>(?:0|[1-9](?:(?:0|[1-9])+)*))[.](?<patch>(?:0|[1-9](?:(?:0|[1-9])+)*))(?:-(?:([A-Za-z1-9])*))?)$/
|
2019-08-08 03:53:54 +02:00
|
|
|
- publish_docker_linuxarm64v8:
|
|
|
|
filters:
|
|
|
|
branches:
|
|
|
|
ignore: /.*/
|
|
|
|
tags:
|
2020-01-22 15:33:33 +01:00
|
|
|
only: /v(?:(?<major>(?:0|[1-9](?:(?:0|[1-9])+)*))[.](?<minor>(?:0|[1-9](?:(?:0|[1-9])+)*))[.](?<patch>(?:0|[1-9](?:(?:0|[1-9])+)*))(?:-(?:([A-Za-z1-9])*))?)$/
|
2022-08-10 08:27:55 +02:00
|
|
|
- publish_docker_multiarch:
|
|
|
|
requires:
|
|
|
|
- publish_docker_linuxamd64
|
|
|
|
- publish_docker_linuxarm32v7
|
|
|
|
- publish_docker_linuxarm64v8
|
|
|
|
filters:
|
|
|
|
branches:
|
|
|
|
ignore: /.*/
|
|
|
|
tags:
|
|
|
|
only: /v(?:(?<major>(?:0|[1-9](?:(?:0|[1-9])+)*))[.](?<minor>(?:0|[1-9](?:(?:0|[1-9])+)*))[.](?<patch>(?:0|[1-9](?:(?:0|[1-9])+)*))(?:-(?:([A-Za-z1-9])*))?)$/
|