-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
37 lines (37 loc) · 1.38 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
FROM python:2.7-alpine
MAINTAINER thomas.monguillon "[email protected]"
ARG NEUTRON_BRANCH=master
ENV NEUTRON_BRANCH $NEUTRON_BRANCH
WORKDIR /opt
RUN apk add --no-cache \
bash \
wget \
curl \
libffi \
libxslt \
mariadb-client
# Install build-deps, pip install packages and clean deps (to keep image small)
RUN apk add --no-cache --virtual build-deps \
git \
gcc \
linux-headers \
libc-dev \
python-dev \
openssl-dev \
libffi-dev \
libxml2-dev \
libxslt-dev \
mariadb-dev \
&& pip install MySQL-python pymysql pymysql_sa \
&& git clone --branch $NEUTRON_BRANCH --depth=1 https://github.com/openstack/requirements \
&& git clone --branch $NEUTRON_BRANCH --depth=1 https://github.com/openstack/neutron \
&& git clone --branch $NEUTRON_BRANCH --depth=1 https://github.com/openstack/python-openstackclient \
&& pip install /opt/neutron -c /opt/requirements/upper-constraints.txt -r /opt/neutron/requirements.txt -r /opt/requirements/requirements.txt \
&& pip install /opt/python-openstackclient -r /opt/python-openstackclient/requirements.txt -r /opt/requirements/requirements.txt \
&& rm -rf /root/.cache \
# && rm -rf /opt/* \
# && rm -rf /var/cache/apk/* \
&& apk del build-deps
COPY neutron.sql /opt/neutron.sql
COPY neutron.conf /etc/neutron/neutron.conf
CMD []