From 2fbd078605c199e49118037747325e833318ef51 Mon Sep 17 00:00:00 2001 From: Sudhakar Reddy Date: Wed, 17 Apr 2019 11:09:50 +0000 Subject: Docker image footprint optimization Change-Id: Ia5820eb95a26c29de0baefba3291336554b4a9de Signed-off-by: Sudhakar Reddy Issue-ID: MULTICLOUD-534 --- azure/docker/Dockerfile | 13 +++++-------- azure/run.sh | 2 +- azure/stop.sh | 2 +- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/azure/docker/Dockerfile b/azure/docker/Dockerfile index 9fd35da..1411937 100644 --- a/azure/docker/Dockerfile +++ b/azure/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM python:2 +FROM python:2-alpine ENV MSB_ADDR "127.0.0.1" ENV MSB_PORT "80" @@ -12,13 +12,10 @@ ENV MR_PORT "3904" EXPOSE 9008 -RUN apt-get update && \ - apt-get install -y unzip && \ - apt-get install -y curl && \ - apt-get install -y wget -RUN apt-get install -y python-dev gcc libffi-dev libssl-dev make +RUN apk update && \ + apk add unzip curl wget git python-dev gcc libffi-dev openssl-dev make libc-dev -RUN groupadd -r onap && useradd -r -g onap onap +RUN addgroup -S onap && adduser -S -G onap onap # ARIA orchestrator addition RUN pip install -U pip setuptools COPY /aria/ /tmp/ @@ -52,7 +49,7 @@ RUN cd /opt/ && \ pip install -r multicloud_azure/requirements.txt && \ chown onap:onap /opt/multicloud_azure -R -RUN mkdir /home/onap && chown onap:onap /home/onap -R +RUN mkdir -p /home/onap && chown onap:onap /home/onap -R WORKDIR /opt RUN chmod +x multicloud_azure/docker/*.sh && chmod +x multicloud_azure/*.sh diff --git a/azure/run.sh b/azure/run.sh index e781063..441e61d 100644 --- a/azure/run.sh +++ b/azure/run.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # Copyright (c) 2018 Amdocs # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/azure/stop.sh b/azure/stop.sh index 3c367de..3ac5c0d 100644 --- a/azure/stop.sh +++ b/azure/stop.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # Copyright (c) 2018 Amdocs # # Licensed under the Apache License, Version 2.0 (the "License"); -- cgit 1.2.3-korg