Name: docker-openstack-cli
Owner: rcbops
Description: null
Created: 2017-07-11 15:18:49.0
Updated: 2017-07-28 21:13:23.0
Pushed: 2017-11-16 17:54:11.0
Homepage: null
Size: 15
Language: null
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Use a Docker image for OpenStack client tooling!
Download the openrc.sh file from Horizon in your OpenStack Cloud.
ce openrc.sh
PWD} is mounted to allow for actions requiring host filesystem access.
e 'Tips' section below
er run -it --rm --volume ${PWD}:/data --env-file <(env | grep OS_) quay.io/rackspace/openstack-cli
openstack --version
openstack server list
openstack volume list
If your cluster is using a self signed certificate for the API endpoints, you can provide that when you run the container:
mkdir certs
in the root of this repocp path/to/my/ca.crt certs/ca.crt
docker run -it --rm --volume ${PWD}:/data -e OS_CACERT=/data/certs/ca.crt --env-file <(env | grep OS_) quay.io/rackspace/openstack-cli
The /data
directory is exposed as a volume that can be mounted. This is convenient for OpenStack
commands that might require reading/writing host filesystems. It is important to remember that
commands such as openstack image save
should ensure that the location where the image is saved is
in the /data
folder when using the --rm
command line option. Example:
ce openrc.sh
er run -it --rm \
volume ${PWD}:/data \
env-file <(env | grep OS_) \
ay.io/rackspace/openstack-cli \
enstack image save --file /data/test_image.img ${IMAGE_GUID}
Run individual commands easily by passing them as the command to run and overriding the default /bin/sh
command. For one-off commands, it's a good practice to remove the container with the --rm
argument so that you don't collect a bunch of orphaned containers.
ce openrc.sh
er run -it --rm \
volume ${PWD}:/data \
env-file <(env | grep OS_) \
ay.io/rackspace/openstack-cli \
enstack volume list
ce openrc.sh
t into a shell to run openstack commands
s osc='docker run -it --rm --volume ${PWD}:/data --env-file <(env | grep OS_) quay.io/rackspace/openstack-cli'
ke it look like you're running openstack locally
s openstack='osc openstack'
Submit a PR with an update to the version in the Dockerfile. Once the PR merges, the master
tag images at quay.io/rackspace/openstack-cli will automatically be updated to that version.
To also update the latest
tag do the following:
master
tag.latest
and click Move Tag.https://github.com/jmcvea/docker-openstack-client