Skip to content

Commit

Permalink
on arm, install docker-compose via pip
Browse files Browse the repository at this point in the history
Sadly, there's no binary distribution for linux+arm yet:
docker/compose#7472

This is an imperfect solution, but it gets us going for now.
  • Loading branch information
yob committed Oct 29, 2020
1 parent 2a2f96c commit 2020f0e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packer/linux/conf/buildkite-agent/hooks/environment
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ BUILDKITE_DOCKER_CONFIG_TEMP_DIRECTORY=$(mktemp -d)
export BUILDKITE_DOCKER_CONFIG_TEMP_DIRECTORY
export DOCKER_CONFIG="$BUILDKITE_DOCKER_CONFIG_TEMP_DIRECTORY"

# on linux/arm64 we have to install docker-compose via pip, which
# has a dependency on the cryptography package, which requires some
# convincing to run with the version of openssl distributed with Amazon Linux 2
export CRYPTOGRAPHY_ALLOW_OPENSSL_102=true

echo "~~~ :llama: Setting up elastic stack environment ($BUILDKITE_STACK_VERSION)"
cat ~/cfn-env

Expand Down
4 changes: 4 additions & 0 deletions packer/linux/scripts/install-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ if [ ${MACHINE} == "x86_64" ]; then
sudo curl -Lsf -o /usr/bin/docker-compose https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-Linux-x86_64
sudo chmod +x /usr/bin/docker-compose
docker-compose --version
elif [[ ${MACHINE} == "aarch64" ]]; then
sudo yum install -y gcc-c++ libffi-devel openssl-devel python3-devel
sudo pip3 install docker-compose
CRYPTOGRAPHY_ALLOW_OPENSSL_102=true docker-compose version
fi

echo "Adding docker cron tasks..."
Expand Down

0 comments on commit 2020f0e

Please sign in to comment.