commit
24f397ab09
@ -1,7 +1,6 @@
|
||||
FROM centos:7
|
||||
|
||||
ENV PATH=/virtualenv/bin:${PATH} \
|
||||
PROJECT=heat
|
||||
ENV PROJECT=heat
|
||||
ARG DOCKER_REPO=yaodu/openstack-requirements
|
||||
ARG DOCKER_TAG=centos
|
||||
ARG WHEELS
|
||||
@ -35,17 +34,14 @@ RUN set -x \
|
||||
&& curl -sSL https://bootstrap.pypa.io/get-pip.py -o get-pip.py \
|
||||
&& python get-pip.py \
|
||||
&& rm get-pip.py \
|
||||
&& pip install virtualenv \
|
||||
&& virtualenv /virtualenv \
|
||||
&& hash -r \
|
||||
&& pip install --no-index --no-compile --find-links /tmp/packages --constraint /tmp/packages/upper-constraints.txt /tmp/${PROJECT} \
|
||||
&& pip install --no-cache-dir --no-index --no-compile --find-links /tmp/packages --constraint /tmp/packages/upper-constraints.txt /tmp/${PROJECT} \
|
||||
&& groupadd -g 42424 ${PROJECT} \
|
||||
&& useradd -u 42424 -g ${PROJECT} -M -d /var/lib/${PROJECT} -s /usr/sbin/nologin -c "${PROJECT} user" ${PROJECT} \
|
||||
&& mkdir -p /etc/${PROJECT} /var/log/${PROJECT} /var/lib/${PROJECT} /var/cache/${PROJECT} \
|
||||
&& chown ${PROJECT}:${PROJECT} /etc/${PROJECT} /var/log/${PROJECT} /var/lib/${PROJECT} /var/cache/${PROJECT} \
|
||||
# common install end
|
||||
# Project specific command block start
|
||||
&& pip install --no-index --no-compile --find-links /tmp/packages --constraint /tmp/packages/upper-constraints.txt python-memcached pymysql \
|
||||
&& pip install --no-cache-dir --no-index --no-compile --find-links /tmp/packages --constraint /tmp/packages/upper-constraints.txt python-memcached pymysql \
|
||||
&& cp -rfv /tmp/${PROJECT}/etc/heat/* /etc/${PROJECT}/ \
|
||||
&& chown -R ${PROJECT}:${PROJECT} /etc/${PROJECT} \
|
||||
&& chown root:root /etc/${PROJECT}/policy.json \
|
||||
@ -53,4 +49,5 @@ RUN set -x \
|
||||
&& yum history -y undo $(yum history list git | tail -2 | head -1 | awk '{ print $1}') \
|
||||
&& yum clean all \
|
||||
&& rm -rf /tmp/* /root/.cache \
|
||||
&& find / -type f \( -name "*.pyc" -o -name "pip" -o -name "easy_install" -o -name "wheel" \) -delete
|
||||
&& pip uninstall pip wheel -y \
|
||||
&& find / -type f -name "*.pyc" -delete
|
||||
|
@ -1,7 +1,6 @@
|
||||
FROM debian:jessie
|
||||
|
||||
ENV PATH=/virtualenv/bin:${PATH} \
|
||||
PROJECT=heat
|
||||
ENV PROJECT=heat
|
||||
ARG DOCKER_REPO=yaodu/openstack-requirements
|
||||
ARG DOCKER_TAG=latest
|
||||
ARG WHEELS
|
||||
@ -36,21 +35,19 @@ RUN set -x \
|
||||
&& curl -sSL https://bootstrap.pypa.io/get-pip.py -o get-pip.py \
|
||||
&& python get-pip.py \
|
||||
&& rm get-pip.py \
|
||||
&& pip install virtualenv \
|
||||
&& virtualenv /virtualenv \
|
||||
&& hash -r \
|
||||
&& pip install --no-index --no-compile --find-links /tmp/packages --constraint /tmp/packages/upper-constraints.txt /tmp/${PROJECT} \
|
||||
&& pip install --no-cache-dir --no-index --no-compile --find-links /tmp/packages --constraint /tmp/packages/upper-constraints.txt /tmp/${PROJECT} \
|
||||
&& groupadd -g 42424 ${PROJECT} \
|
||||
&& useradd -u 42424 -g ${PROJECT} -M -d /var/lib/${PROJECT} -s /usr/sbin/nologin -c "${PROJECT} user" ${PROJECT} \
|
||||
&& mkdir -p /etc/${PROJECT} /var/log/${PROJECT} /var/lib/${PROJECT} /var/cache/${PROJECT} \
|
||||
&& chown ${PROJECT}:${PROJECT} /etc/${PROJECT} /var/log/${PROJECT} /var/lib/${PROJECT} /var/cache/${PROJECT} \
|
||||
# common install end
|
||||
# Project specific command block start
|
||||
&& pip install --no-index --no-compile --find-links /tmp/packages --constraint /tmp/packages/upper-constraints.txt python-memcached pymysql \
|
||||
&& pip install --no-cache-dir --no-index --no-compile --find-links /tmp/packages --constraint /tmp/packages/upper-constraints.txt python-memcached pymysql \
|
||||
&& cp -rfv /tmp/${PROJECT}/etc/heat/* /etc/${PROJECT}/ \
|
||||
&& chown -R ${PROJECT}:${PROJECT} /etc/${PROJECT} \
|
||||
&& chown root:root /etc/${PROJECT}/policy.json \
|
||||
# Project specific command block end
|
||||
&& apt-get purge -y --auto-remove ca-certificates curl git \
|
||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /root/.cache \
|
||||
&& find / -type f \( -name "*.pyc" -o -name "pip" -o -name "easy_install" -o -name "wheel" \) -delete
|
||||
&& pip uninstall pip wheel -y \
|
||||
&& find / -type f -name "*.pyc" -delete
|
||||
|
@ -1,7 +1,6 @@
|
||||
FROM ubuntu:xenial
|
||||
|
||||
ENV PATH=/virtualenv/bin:${PATH} \
|
||||
PROJECT=heat
|
||||
ENV PROJECT=heat
|
||||
ARG DOCKER_REPO=yaodu/openstack-requirements
|
||||
ARG DOCKER_TAG=ubuntu
|
||||
ARG WHEELS
|
||||
@ -36,21 +35,19 @@ RUN set -x \
|
||||
&& curl -sSL https://bootstrap.pypa.io/get-pip.py -o get-pip.py \
|
||||
&& python get-pip.py \
|
||||
&& rm get-pip.py \
|
||||
&& pip install virtualenv \
|
||||
&& virtualenv /virtualenv \
|
||||
&& hash -r \
|
||||
&& pip install --no-index --no-compile --find-links /tmp/packages --constraint /tmp/packages/upper-constraints.txt /tmp/${PROJECT} \
|
||||
&& pip install --no-cache-dir --no-index --no-compile --find-links /tmp/packages --constraint /tmp/packages/upper-constraints.txt /tmp/${PROJECT} \
|
||||
&& groupadd -g 42424 ${PROJECT} \
|
||||
&& useradd -u 42424 -g ${PROJECT} -M -d /var/lib/${PROJECT} -s /usr/sbin/nologin -c "${PROJECT} user" ${PROJECT} \
|
||||
&& mkdir -p /etc/${PROJECT} /var/log/${PROJECT} /var/lib/${PROJECT} /var/cache/${PROJECT} \
|
||||
&& chown ${PROJECT}:${PROJECT} /etc/${PROJECT} /var/log/${PROJECT} /var/lib/${PROJECT} /var/cache/${PROJECT} \
|
||||
# common install end
|
||||
# Project specific command block start
|
||||
&& pip install --no-index --no-compile --find-links /tmp/packages --constraint /tmp/packages/upper-constraints.txt python-memcached pymysql \
|
||||
&& pip install --no-cache-dir --no-index --no-compile --find-links /tmp/packages --constraint /tmp/packages/upper-constraints.txt python-memcached pymysql \
|
||||
&& cp -rfv /tmp/${PROJECT}/etc/heat/* /etc/${PROJECT}/ \
|
||||
&& chown -R ${PROJECT}:${PROJECT} /etc/${PROJECT} \
|
||||
&& chown root:root /etc/${PROJECT}/policy.json \
|
||||
# Project specific command block end
|
||||
&& apt-get purge -y --auto-remove ca-certificates curl git \
|
||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /root/.cache \
|
||||
&& find / -type f \( -name "*.pyc" -o -name "pip" -o -name "easy_install" -o -name "wheel" \) -delete
|
||||
&& pip uninstall pip wheel -y \
|
||||
&& find / -type f -name "*.pyc" -delete
|
||||
|
@ -24,10 +24,7 @@ COMMON_INSTALL=$(cat <<'END_HEREDOC'
|
||||
&& curl -sSL https://bootstrap.pypa.io/get-pip.py -o get-pip.py \\\n\
|
||||
&& python get-pip.py \\\n\
|
||||
&& rm get-pip.py \\\n\
|
||||
&& pip install virtualenv \\\n\
|
||||
&& virtualenv /virtualenv \\\n\
|
||||
&& hash -r \\\n\
|
||||
&& pip install --no-index --no-compile --find-links /tmp/packages --constraint /tmp/packages/upper-constraints.txt /tmp/${PROJECT} \\\n\
|
||||
&& pip install --no-cache-dir --no-index --no-compile --find-links /tmp/packages --constraint /tmp/packages/upper-constraints.txt /tmp/${PROJECT} \\\n\
|
||||
&& groupadd -g 42424 ${PROJECT} \\\n\
|
||||
&& useradd -u 42424 -g ${PROJECT} -M -d /var/lib/${PROJECT} -s /usr/sbin/nologin -c "${PROJECT} user" ${PROJECT} \\\n\
|
||||
&& mkdir -p /etc/${PROJECT} /var/log/${PROJECT} /var/lib/${PROJECT} /var/cache/${PROJECT} \\\n\
|
||||
|
Loading…
Reference in New Issue
Block a user