Add Dockerfile

Add this dockerfile for developer and contributor, those who can
build their own developement environment easily and quickly. Without
any worry about the python packages incompatible.

Change-Id: Ie045c6221004f60a3af73f53b1370a3e431e96e0
This commit is contained in:
caishan 2018-05-09 03:52:13 -07:00
parent 778ed4ab6e
commit 318a788e38
2 changed files with 49 additions and 0 deletions

View File

@ -0,0 +1,30 @@
FROM alpine:3.7
WORKDIR /opt
RUN apk update \
&& apk add --no-cache\
bash \
iproute2 \
openvswitch \
py-pip \
python \
uwsgi-python \
libffi-dev \
openssl-dev \
&& apk add --no-cache --virtual build-deps \
gcc \
git \
linux-headers \
musl-dev \
python-dev \
&& pip install -U pip setuptools \
\
&& git clone https://github.com/openstack/zun \
&& cd /opt/zun \
&& pip install -r ./requirements.txt \
&& python setup.py install \
&& cd / \
&& apk del build-deps
VOLUME /var/log/zun
VOLUME /etc/zun

View File

@ -0,0 +1,19 @@
Budil-Zun-Service-Dcoker Image
=======================
By using this dockerfile, you can build your own Zun service docker container eaily and quickly.
Build docker container image
for example, we build a docker container image named `zun-service-img`.
```docker build -t zun-service-img .```
Run zun service container
Start a container by unsing our build image above.
```docker run --name zun-service \
--net=host \
-v /var/run:/var/run \
zun-service-img```
Note: You should enter the container and config the zun config file in the path /etc/zun/,
More info about the config please reference the installation docs.