summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSudhakar Reddy <Sudhakar.Reddy@amdocs.com>2019-04-17 11:09:50 +0000
committerSudhakar Reddy <Sudhakar.Reddy@amdocs.com>2019-04-19 09:22:11 +0000
commit2fbd078605c199e49118037747325e833318ef51 (patch)
tree998b7c3d029bb1e082e56728dbe4befbaccaa9e3
parent658602b4808bd093b75adb6a151982a7b44c7f0a (diff)
Docker image footprint optimization
Change-Id: Ia5820eb95a26c29de0baefba3291336554b4a9de Signed-off-by: Sudhakar Reddy <Sudhakar.Reddy@amdocs.com> Issue-ID: MULTICLOUD-534
-rw-r--r--azure/docker/Dockerfile13
-rw-r--r--azure/run.sh2
-rw-r--r--azure/stop.sh2
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");