From 3a41253f6d3c7c957ef119d1b4fad3b653030edc Mon Sep 17 00:00:00 2001 From: Adolfo Perez-Duran Date: Mon, 5 Nov 2018 06:52:48 -0700 Subject: Migrate HAS base image to alpine. Make HAS container image smaller and platform-agnostic. Issue-ID: INT-551 Change-Id: Icee2b3137142dde1689de71f30bb0d5c791ce84c Signed-off-by: Adolfo Perez-Duran --- conductor/docker/Dockerfile | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'conductor') diff --git a/conductor/docker/Dockerfile b/conductor/docker/Dockerfile index 0222c9f..b68ebaf 100755 --- a/conductor/docker/Dockerfile +++ b/conductor/docker/Dockerfile @@ -15,7 +15,7 @@ # # ------------------------------------------------------------------------- -FROM python:2.7 +FROM python:2.7-alpine ARG MVN_ARTIFACT_VERSION ARG REPO @@ -29,15 +29,28 @@ ENV CON_PORT "8091" EXPOSE ${CON_PORT} -RUN apt-get update && apt-get --assume-yes install python-setuptools && \ -apt-get install -y unzip curl wget git vim +# Add required libraries +RUN apk add --no-cache curl \ + gcc \ + libffi-dev \ + linux-headers \ + musl-dev \ + git \ + libxml2-dev \ + libxslt-dev \ + openssl-dev \ + py-setuptools \ + unzip \ + wget \ + xvfb -# HAS WORKDIR /opt/has RUN wget -O /opt/has.zip "https://nexus.onap.org/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.optf.has&a=optf-has-conductor&e=zip&v=${MVN_ARTIFACT_VERSION}" && \ unzip -q -o -B /opt/has.zip -d /opt/has && \ rm -f /opt/has.zip RUN mkdir -p /var/log/onap/optf/has/ -RUN cd /opt/has/conductor/ && git init && pip install -e . +RUN cd /opt/has/conductor && \ + git init && \ + pip install -e . COPY api_paste.ini /usr/local/bin/api_paste.ini -- cgit 1.2.3-korg