UNCLASSIFIED

Commit ae9a491f authored by Andy Maksymowicz's avatar Andy Maksymowicz
Browse files

Merge branch 'RemoveDefaultPWD' into 'development'

Remove default pwd

See merge request !19
parents 63824e66 882dd632
Pipeline #208553 failed with stages
in 33 seconds
......@@ -8,8 +8,6 @@ ARG BASE_TAG=8.3
FROM ${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG}
ENV HUB_DEFAULT_PWD=HubSecretPasswd
RUN yum -y update \
&& yum clean all
......@@ -83,4 +81,4 @@ USER codesonar
WORKDIR /home/codesonar
EXPOSE 7340/tcp
CMD ["sh", "-c", "/opt/codesonar-exec.sh $HUB_DEFAULT_PWD"]
CMD ["sh", "-c", "/opt/codesonar-exec.sh"]
#!/bin/sh
echo "Starting hub in /home/codesonar/hub"
echo -e "$1\n$1\n" | /opt/codesonar/codesonar/bin/codesonar hub-start /home/codesonar/hub 0.0.0.0:7340
if test -f "/home/codesonar/hub/hubpwd"; then
echo "Starting hub in /home/codesonar/hub with existing pwd"
/opt/codesonar/codesonar/bin/codesonar hub-start /home/codesonar/hub 0.0.0.0:7340
else
HUB_DEFAULT_PWD=$(date +%s | base64 | head -c 32)
echo "${HUB_DEFAULT_PWD}" > /home/codesonar/hub/hubpwd
chmod 600 /home/codesonar/hub/hubpwd
echo "Starting hub with new hub password: ${HUB_DEFAULT_PWD}"
echo -e "${HUB_DEFAULT_PWD}\n${HUB_DEFAULT_PWD}\n" | /opt/codesonar/codesonar/bin/codesonar hub-start /home/codesonar/hub 0.0.0.0:7340
fi
echo "Hub started..."
while [ 1 ]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment