diff --git a/Dockerfile b/Dockerfile index 1ac0ec8..7617a84 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,7 +40,9 @@ RUN buildDeps='gcc git libffi-dev libssl-dev python3-dev python3-pip python3-whe chown -R postgres /run/postgresql && \ pip install --disable-pip-version-check --no-cache-dir \ envdir==0.7 \ - wal-e[aws,azure,google,swift]==v1.0.2 && \ + wal-e[aws,azure,google,swift]==v1.0.2 \ + # pin azure-storage to version wal-e uses (see docker-entrypoint.sh) + azure-storage==0.20.0 && \ # "upgrade" boto to 2.43.0 + the patch to fix minio connections pip install --disable-pip-version-check --no-cache-dir --upgrade git+https://github.com/deis/boto@88c980e56d1053892eb940d43a15a68af4ebb5e6 && \ # cleanup diff --git a/rootfs/bin/create_bucket b/rootfs/bin/create_bucket index 12ac54c..2d23f63 100755 --- a/rootfs/bin/create_bucket +++ b/rootfs/bin/create_bucket @@ -11,7 +11,7 @@ from boto.s3.connection import S3Connection, OrdinaryCallingFormat from oauth2client.service_account import ServiceAccountCredentials from gcloud.storage.client import Client from gcloud import exceptions -from azure.storage.blob import BlockBlobService +from azure.storage.blob import BlobService def bucket_exists(conn, name): bucket = conn.lookup(name) @@ -60,7 +60,7 @@ elif os.getenv('DATABASE_STORAGE') == "gcs": conn.create_bucket(bucket_name) elif os.getenv('DATABASE_STORAGE') == "azure": - conn = BlockBlobService(account_name=os.getenv('WABS_ACCOUNT_NAME'), account_key=os.getenv('WABS_ACCESS_KEY')) + conn = BlobService(account_name=os.getenv('WABS_ACCOUNT_NAME'), account_key=os.getenv('WABS_ACCESS_KEY')) #It doesn't throw an exception if the container exists by default(https://github.com/Azure/azure-storage-python/blob/master/azure/storage/blob/baseblobservice.py#L504). conn.create_container(bucket_name)