Docker container that integrates OpenStack's Swift CLI client
1.9K
This container comes with an installation of OpenStack's Swift and Keystone CLI clients.
If you're not familiarized with the Swift client, checkout the following links:
In order to authenticate against your service provider, you must pass your Swift credentias via environment variables. If you don't quite get it, please refer to the following links:
Uppon running this image, it will automatically execute the swift command, followed by any arguments you provide.
Assume we're going to authenticate using Keystone v3 to a generic Object Storage service provider. As Swift's documentation states for Authentication, we will need to pass the following variables (filled with credentials) to our docker image:
| Variables | Value |
|---|---|
| ST_AUTH_VERSION | 3 |
| OS_USER_ID | abcdef0123456789abcdef0123456789 |
| OS_PASSWORD | password |
| OS_PROJECT_ID | 0123456789abcdef0123456789abcdef |
| OS_AUTH_URL | https://api.example.com:5000/v3 |
In order to tell docker to include those variables during runtime, we need to execute the following:
docker run -e ST_AUTH_VERSION -e OS_USER_ID -e OS_PASSWORD -e OS_PROJECT_ID -e OS_AUTH_URL openstack-swift-container --version
If the image is unable to authenticate against your service provider, it will show an error message and exit from execution.
By default, this image does a pre-check of authentication against your service provider before running your specified Swift command.
You can disable this behaviour by passing the INPUT_AUTH_CHECK environment variable with a string value of 'false':
INPUT_AUTH_CHECK='false'
docker run -e ST_AUTH_VERSION -e OS_USER_ID -e OS_PASSWORD -e OS_PROJECT_ID -e OS_AUTH_URL -e INPUT_AUTH_CHECK openstack-swift-container --version
To execute Swift Commands with this image, we need to call them via args in the docker run command.
Let's say we want to list our available containers. We must run:
docker run <--env ...> openstack-swift-container list
If we would like to upload Log.1 and Log.2 files to our logs container, we could run:
docker run <--env ...> openstack-swift-container upload logs Log.1 Log.2
Content type
Image
Digest
Size
79.5 MB
Last updated
about 6 years ago
docker pull iksaku/openstack-swift-container:3.9.0