Update the base_sdc-python 63/108763/5
authork.kedron <k.kedron@partner.samsung.com>
Thu, 4 Jun 2020 09:17:44 +0000 (11:17 +0200)
committerOfir Sonsino <ofir.sonsino@intl.att.com>
Mon, 15 Jun 2020 07:48:29 +0000 (07:48 +0000)
To use the new integration-python base image.

Issue-ID: SDC-2784
Signed-off-by: Krystian Kedron <k.kedron@partner.samsung.com>
Change-Id: I84562747293c55ada644b20dc2b613212787efbd

base_sdc-python/Dockerfile
base_sdc-python/requirements.txt [new file with mode: 0644]

index d9dd3e5..57daaa9 100644 (file)
@@ -1,4 +1,6 @@
-FROM python:2.7-alpine
+FROM nexus3.onap.org:10001/onap/integration-python:7.0.0
+
+USER root
 
 # Needed for pycurl
 ENV PYCURL_SSL_LIBRARY=openssl
@@ -8,26 +10,28 @@ RUN apk update && \
     apk add binutils jq libpng && \
     apk add --no-cache \
         libcurl \
-        curl \
         jq \
-        libressl-dev \
         bash \
-        ruby=2.6.6-r2 \
+        ruby=2.6.6-r2 && \
+    apk add --no-cache --virtual .build-dependencies \
+        libressl-dev \
         ruby-dev \
         libffi-dev \
-        libxml2-dev && \
-    apk add --no-cache --virtual .build-dependencies \
+        libxml2-dev \
         build-base \
         curl-dev && \
-    pip install 'influxdb==5.0.0' 'pycurl==7.43.0.1' 'requests==2.18.4' &&  \
+    # needed libcurl to install correctly
+    pip install 'pycurl==7.43.0.1' &&  \
         set -ex && \
     gem install \
         chef:13.8.5 \
         berkshelf:6.3.1 \
         io-console:0.4.6 \
         etc webrick \
-        --no-document
+        --no-document && \
+    apk del .build-dependencies
 
-RUN addgroup -g 1000 sdc && adduser -S -u 1000 -G sdc -s /bin/sh sdc
+# user/group are the same as in integration/docker/onap-python base image
+ENV user=onap group=onap
 
-USER sdc
+USER $user
diff --git a/base_sdc-python/requirements.txt b/base_sdc-python/requirements.txt
new file mode 100644 (file)
index 0000000..c33f61d
--- /dev/null
@@ -0,0 +1,2 @@
+influxdb==5.0.0
+requests==2.18.4
\ No newline at end of file