add Dockerfile

Change-Id: I1a157942ff7d04b428a623251708a9018294860a
This commit is contained in:
Xin 2016-04-20 15:16:15 -07:00
parent e5b9fd31af
commit 8b6a7c7371
3 changed files with 39 additions and 0 deletions

3
.dockerignore Normal file
View File

@ -0,0 +1,3 @@
.git
.gitignore
.gitreview

15
Dockerfile Normal file
View File

@ -0,0 +1,15 @@
# docker file for creating a container that has kloudbuster installed and ready to use
FROM ubuntu:14.04
MAINTAINER kloudbuster-core <kloudbuster-core@lists.launchpad.net>
# Install KloudBuster script and dependencies
RUN apt-get update && apt-get install -y \
libyaml-dev \
python \
python-dev \
python-pip \
python-virtualenv \
&& rm -rf /var/lib/apt/lists/*
RUN pip install pytz
RUN pip install kloudbuster

View File

@ -69,6 +69,27 @@ Bugs should be filed on Launchpad, not GitHub:
https://bugs.launchpad.net/kloudbuster
Build KloudBuster Docker Image
-----------------------
Two files are used to build the Docker image: *Dockerfile* and *.dockerignore*. The former provides all the build instructions while the latter provides the list of files/directories that should not be copied to the Docker image.
In order to make the Docker image clean, remove all auto generated files from the root of your workspace first. Specify the image name and the tag, and feed them to docker build. Examples to build the image with name "$USER/koudbuster", tag "latest"::
$ cd <koudbuster-ws-root>
$ sudo docker build --tag=$USER/koudbuster:latest .
The images should be available for use::
$ sudo docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
xiyu3/kloudbuster latest 0f17ae788c69 8 minutes ago 443.1 MB
For exchanging purposes, the image could be saved to a tar archive. You can distribute the KloudBuster Docker image among your servers easily with this feature::
$ sudo docker save -o <IMAGE_FILE> <IMAGE_ID>
.. _developer_guide_of_openstack:
Developer's Guide of OpenStack