From 318a788e3829f3da7d728ed3b06dcd14ada2ed21 Mon Sep 17 00:00:00 2001 From: caishan Date: Wed, 9 May 2018 03:52:13 -0700 Subject: [PATCH] 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 --- contrib/quick-start/Dockerfile | 30 ++++++++++++++++++++++++++++++ contrib/quick-start/README.md | 19 +++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 contrib/quick-start/Dockerfile create mode 100644 contrib/quick-start/README.md diff --git a/contrib/quick-start/Dockerfile b/contrib/quick-start/Dockerfile new file mode 100644 index 000000000..67ed0a7a7 --- /dev/null +++ b/contrib/quick-start/Dockerfile @@ -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 diff --git a/contrib/quick-start/README.md b/contrib/quick-start/README.md new file mode 100644 index 000000000..99b21ee70 --- /dev/null +++ b/contrib/quick-start/README.md @@ -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.