diff --git a/.circleci/test-deploy.yml b/.circleci/test-deploy.yml index 30e679f..56c50d7 100644 --- a/.circleci/test-deploy.yml +++ b/.circleci/test-deploy.yml @@ -38,6 +38,7 @@ promotion_requires: &promotion_requires test-macos-old, test-machine-latest, test-machine-old, + test-machine-arm, test-build-command-workspace, test-build-with-args, test-build-bash-substitution @@ -269,7 +270,7 @@ jobs: - docker/install-docker-compose: version: << parameters.docker-compose-version>> install-dir: << parameters.install-dir>> - + test-hadolint-install: parameters: executor: @@ -280,7 +281,7 @@ jobs: - docker/hadolint: dockerfiles: test.Dockerfile ignore-rules: DL4005,DL3008,DL3009,DL3015 - trusted-registries: docker.io,my-company.com:5000 + trusted-registries: docker.io,my-company.com:5000 - run: name: Verifying hadolint install command: | @@ -305,7 +306,7 @@ workflows: name: test-install-hadolint-<< matrix.executor >> matrix: parameters: - executor: [docker-latest, machine-arm, macos-latest] + executor: [docker-latest, machine-arm, macos-latest] filters: *filters - test-dockerlint: name: dockerlint @@ -595,7 +596,7 @@ workflows: name: test-<< matrix.executor >> matrix: parameters: - executor: [macos-latest, macos-old] + executor: [macos-latest, macos-old, machine-arm] install-goss: false filters: *filters # end test diff --git a/src/scripts/install-docker-compose.sh b/src/scripts/install-docker-compose.sh index 5676e9f..e771f63 100644 --- a/src/scripts/install-docker-compose.sh +++ b/src/scripts/install-docker-compose.sh @@ -52,9 +52,15 @@ else PLATFORM=linux fi +SYS_ARCH=$(uname -m) + +if [ "$SYS_ARCH" == "arm64" ]; then + SYS_ARCH="aarch64" +fi + DOCKER_COMPOSE_BASE_URL="https://github.com/docker/compose/releases/download/$DOCKER_COMPOSE_VERSION" DOCKER_COMPOSE_RELEASES_HTML="$(curl -Ls --fail --retry 3 "https://github.com/docker/compose/releases/tag/$DOCKER_COMPOSE_VERSION")" -DOCKER_COMPOSE_RELEASE="docker-compose-$PLATFORM-x86_64" +DOCKER_COMPOSE_RELEASE="docker-compose-$PLATFORM-$SYS_ARCH" DOCKER_SHASUM_FILENAME="checksum.txt" # since v2.10.0, docker-compose doesn't have a ".sha256" file diff --git a/src/scripts/install-docker.sh b/src/scripts/install-docker.sh index 98aee48..a541776 100644 --- a/src/scripts/install-docker.sh +++ b/src/scripts/install-docker.sh @@ -55,7 +55,13 @@ else PLATFORM=linux fi -DOCKER_BINARY_URL="https://download.docker.com/$PLATFORM/static/stable/x86_64/docker-$DOCKER_VERSION_NUMBER.tgz" +SYS_ARCH=$(uname -m) + +if [ "$SYS_ARCH" == "arm64" ]; then + SYS_ARCH="aarch64" +fi + +DOCKER_BINARY_URL="https://download.docker.com/$PLATFORM/static/stable/$SYS_ARCH/docker-$DOCKER_VERSION_NUMBER.tgz" # download binary tarball DOWNLOAD_DIR="$(mktemp -d)" diff --git a/src/scripts/install-dockerize.sh b/src/scripts/install-dockerize.sh index 0db53ac..135aeb6 100644 --- a/src/scripts/install-dockerize.sh +++ b/src/scripts/install-dockerize.sh @@ -33,7 +33,15 @@ elif cat /etc/issue | grep Alpine &> /dev/null; then PLATFORM=alpine-linux-amd64 apk add --no-cache openssl else - PLATFORM=linux-amd64 + SYS_ARCH=$(uname -m) + + if [[ $SYS_ARCH == "x86_64" ]]; then + SYS_ARCH="amd64" + elif [[ $SYS_ARCH == "aarch64" ]]; then + SYS_ARCH="arm64" + fi + + PLATFORM=linux-$SYS_ARCH fi DOCKERIZE_BINARY_URL="https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-$PLATFORM-$DOCKERIZE_VERSION.tar.gz"