From e22ad4eabc88aa9a25c89ee3351d23654a472819 Mon Sep 17 00:00:00 2001 From: Bin Yang Date: Wed, 25 Aug 2021 12:01:27 +0800 Subject: Align image base to resolve GPLv3 issue Issue-ID: MULTICLOUD-1385 Signed-off-by: Bin Yang Change-Id: I2dea1efa1fdc242c666f48b9ec19306d00695ced --- pike/docker/Dockerfile | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pike/docker/Dockerfile b/pike/docker/Dockerfile index 10e27003..bf632ce4 100644 --- a/pike/docker/Dockerfile +++ b/pike/docker/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM python:3.8-slim +FROM python:3.8-alpine ARG HTTP_PROXY=${HTTP_PROXY} ARG HTTPS_PROXY=${HTTPS_PROXY} @@ -32,20 +32,19 @@ ENV AAI_PASSWORD "AAI" EXPOSE 9007 -RUN groupadd -r onap && useradd -r -g onap onap +RUN addgroup -S onap && adduser -S -G onap onap COPY ./multicloud-openstack-pike-*.zip /opt/multicloud-openstack-pike.zip -RUN apt-get update && \ - apt-get install -y memcached wget unzip gcc libssl-dev && \ +RUN apk update && \ + apk add pcre pcre-dev uwsgi memcached wget unzip gcc make libc-dev libffi-dev openssl-dev && \ cd /opt/ && \ unzip -q -o -B /opt/multicloud-openstack-pike.zip -d /opt/ && \ rm -f /opt/multicloud-openstack-pike.zip && \ pip3 install --no-cache-dir -r /opt/pike/requirements.txt && \ pip3 install --no-cache-dir -r /opt/pike/uwsgi-requirements.txt && \ - apt-get --purge remove -y wget unzip gcc libssl-dev && \ + apk del wget unzip gcc make libc-dev libffi-dev openssl-dev pcre-dev && \ mkdir -p /var/log/onap/multicloud/openstack/pike && \ chown onap:onap /var/log/onap -R && \ - apt-get -y autoremove && \ chown onap:onap /opt/pike -R RUN mkdir -p /var/log/onap/multicloud/openstack/pike/ -- cgit 1.2.3-korg