From 58ca9eaef2c8e6348b91f7fcaf93149341a58d7b Mon Sep 17 00:00:00 2001 From: Remi Taffin Date: Wed, 9 Oct 2019 09:08:35 -0400 Subject: [PATCH 1/2] Add Dockerfile for Azure --- Dockerfile.azure | 7 +++++++ README.md | 4 ++++ install.azure.sh | 9 +++++++++ 3 files changed, 20 insertions(+) create mode 100644 Dockerfile.azure create mode 100755 install.azure.sh diff --git a/Dockerfile.azure b/Dockerfile.azure new file mode 100644 index 0000000..c302a11 --- /dev/null +++ b/Dockerfile.azure @@ -0,0 +1,7 @@ +ARG TAG +FROM satoshipay/stellar-core:$TAG + +ENV AZURE_STORAGE_AUTH_MODE=key + +ADD install.azure.sh / +RUN /install.azure.sh diff --git a/README.md b/README.md index 1512a0f..a61f1d0 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,10 @@ and come in multiple flavors that are available as tags: * AWS: comes with AWS CLI installed, example tags are `10.0.0-aws` or `latest-aws`. * Google Cloud: comes with Google Cloud SDK installed, example tags are `10.0.0-gcloud` or `latest-gcloud`. A Service Account is automatically configured if a key is provided via `GCLOUD_SERVICE_ACCOUNT_KEY`. + * Azure: comes with Azure CLI installed, example tags are `latest-azure`. + Required environment variables: + - AZURE_STORAGE_ACCOUNT= + - AZURE_STORAGE_KEY= ## Configuration diff --git a/install.azure.sh b/install.azure.sh new file mode 100755 index 0000000..a0360ec --- /dev/null +++ b/install.azure.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +set -ue + +# https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-apt +curl -sL https://aka.ms/InstallAzureCLIDeb | bash + +# cleanup apt cache +rm -rf /var/lib/apt/lists/* From 0bd5f18f75a9f6daf849d9eefd69c5122053019b Mon Sep 17 00:00:00 2001 From: Remi Taffin Date: Thu, 10 Oct 2019 08:13:44 -0400 Subject: [PATCH 2/2] Add azure flavor to publish.sh --- publish.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/publish.sh b/publish.sh index ef1e432..3b31524 100755 --- a/publish.sh +++ b/publish.sh @@ -18,3 +18,6 @@ docker push ${REPO}:${TAG}-aws docker build --build-arg TAG=${TAG} -t ${REPO}:${TAG}-gcloud -f Dockerfile.gcloud . docker push ${REPO}:${TAG}-gcloud + +docker build --build-arg TAG=${TAG} -t ${REPO}:${TAG}-azure -f Dockerfile.azure . +docker push ${REPO}:${TAG}-azure