summaryrefslogtreecommitdiffstats
path: root/auth/auth-cass/docker
diff options
context:
space:
mode:
authorInstrumental <jonathan.gathman@att.com>2019-02-07 16:36:56 -0600
committerInstrumental <jonathan.gathman@att.com>2019-02-07 16:37:00 -0600
commit27afb0201ce717c25d8ffcc50f8b4972fc98f5c5 (patch)
treefcc70c64abc1b5741f92b65b354ea009f5fc4175 /auth/auth-cass/docker
parente2fa0e67712b92c69f6863afe10c1c973a068e3e (diff)
Refine properties for non-root
Issue-ID: AAF-698 Change-Id: I266f0e36842fb506dbb3e412e12eedf64e24418a Signed-off-by: Instrumental <jonathan.gathman@att.com>
Diffstat (limited to 'auth/auth-cass/docker')
-rw-r--r--auth/auth-cass/docker/Dockerfile.cass5
-rw-r--r--auth/auth-cass/docker/dbash.sh28
-rw-r--r--auth/auth-cass/docker/dbuild.sh4
-rw-r--r--auth/auth-cass/docker/drun.sh1
4 files changed, 9 insertions, 29 deletions
diff --git a/auth/auth-cass/docker/Dockerfile.cass b/auth/auth-cass/docker/Dockerfile.cass
index e79b33fc..aa6a9efb 100644
--- a/auth/auth-cass/docker/Dockerfile.cass
+++ b/auth/auth-cass/docker/Dockerfile.cass
@@ -30,6 +30,11 @@ COPY cass_init/*.props /opt/app/aaf/cass_init/
COPY aaf-auth-batch-${AAF_VERSION}-full.jar /opt/app/aaf/cass_init/
COPY cass_data/*.dat /opt/app/aaf/cass_init/dats/
+RUN mkdir -p /opt/app/aaf/status && chmod 777 /opt/app/aaf/status
+#RUN addgroup ${USER} && adduser --no-create-home --ingroup ${USER} --disabled-password --gecos "" --shell /bin/bash ${USER}
+#RUN chown -R ${USER}:${USER} /opt/app/aaf/cass_init
+
+
ENTRYPOINT ["/bin/bash","/opt/app/aaf/cass_init/cmd.sh"]
CMD ["start"]
# Default is to start up with CQL setup only
diff --git a/auth/auth-cass/docker/dbash.sh b/auth/auth-cass/docker/dbash.sh
deleted file mode 100644
index 1e13d27d..00000000
--- a/auth/auth-cass/docker/dbash.sh
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/bash
-#########
-# ============LICENSE_START====================================================
-# org.onap.aaf
-# ===========================================================================
-# Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
-# ===========================================================================
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# ============LICENSE_END====================================================
-#
-# Pull in AAF Env Variables from AAF install
-if [ -e ../../docker/d.props ]; then
- . ../../docker/d.props
-fi
-DOCKER=${DOCKER:-docker}
-
-$DOCKER exec -it aaf_cass bash
-
diff --git a/auth/auth-cass/docker/dbuild.sh b/auth/auth-cass/docker/dbuild.sh
index 100b8cb9..c708dad5 100644
--- a/auth/auth-cass/docker/dbuild.sh
+++ b/auth/auth-cass/docker/dbuild.sh
@@ -30,7 +30,9 @@ echo "Building aaf_cass Container for aaf_cass:$VERSION"
DIR=$(pwd)
cd ..
-sed -e 's/${AAF_VERSION}/'${VERSION}'/g' $DIR/Dockerfile.cass > Dockerfile
+sed -e 's/${AAF_VERSION}/'${VERSION}'/g' \
+ -e 's/${USER}/'${USER}'/g' \
+ $DIR/Dockerfile.cass > Dockerfile
cd ..
cp -Rf sample/cass_data auth-cass/cass_data
cp sample/data/sample.identities.dat auth-cass
diff --git a/auth/auth-cass/docker/drun.sh b/auth/auth-cass/docker/drun.sh
index 778947eb..cd8ab78c 100644
--- a/auth/auth-cass/docker/drun.sh
+++ b/auth/auth-cass/docker/drun.sh
@@ -38,6 +38,7 @@ fi
if [ "`$DOCKER ps -a | grep aaf-cass`" == "" ]; then
echo "starting Cass from 'run'"
# NOTE: These HEAP Sizes are minimal. Not set for full organizations.
+ # --user ${USER} \
$DOCKER run \
--name aaf-cass \
-e HEAP_NEWSIZE=512M \