create sdc user for non-root running of pods 36/103436/1
authorMichaelMorris <michael.morris@est.tech>
Fri, 6 Mar 2020 16:50:50 +0000 (16:50 +0000)
committerMichael Morris <michael.morris@est.tech>
Tue, 10 Mar 2020 13:11:10 +0000 (13:11 +0000)
Change-Id: I7d6f7d7f67c23fcd063a5944341a1e8cae85e893
Issue-ID: SDC-2798
Signed-off-by: MichaelMorris <michael.morris@est.tech>
base_sdc-cqlsh/Dockerfile
base_sdc-python/Dockerfile

index ce779d7..277ed02 100644 (file)
@@ -1,5 +1,12 @@
 FROM openjdk:8-jdk-alpine
 
+RUN addgroup -g 1000 sdc && adduser -S -u 1000 -G sdc -s /bin/sh sdc
+USER sdc
+RUN mkdir ~/.cassandra/ && \
+    echo  '[cql]' > ~/.cassandra/cqlshrc  && \
+    echo  'version=3.4.4' >> ~/.cassandra/cqlshrc 
+USER root
+
 RUN apk add --no-cache py-pip && \
     pip install cqlsh==5.0.4 && \
     mkdir ~/.cassandra/ && \
@@ -18,4 +25,4 @@ RUN apk add --no-cache py-pip && \
     apk update && \
     apk add binutils \
     libtasn1
-
+USER sdc
index d2d316d..96e4eb8 100644 (file)
@@ -28,7 +28,6 @@ RUN apk update && \
         etc webrick \
         --no-document
 
+RUN addgroup -g 1000 sdc && adduser -S -u 1000 -G sdc -s /bin/sh sdc
 
-
-
-
+USER sdc