UNCLASSIFIED
Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Ironbank Containers
G
GrammaTech
CodeSonar
codesonar-hub
Commits
ae9a491f
Commit
ae9a491f
authored
Apr 01, 2021
by
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
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
8 deletions
+14
-8
Dockerfile
Dockerfile
+2
-4
scripts/codesonar-exec.sh
scripts/codesonar-exec.sh
+12
-4
No files found.
Dockerfile
View file @
ae9a491f
...
@@ -7,9 +7,7 @@ ARG BASE_TAG=8.3
...
@@ -7,9 +7,7 @@ ARG BASE_TAG=8.3
#change this for deployment!!!
#change this for deployment!!!
FROM
${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG}
FROM
${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG}
ENV
HUB_DEFAULT_PWD=HubSecretPasswd
RUN
yum
-y
update
\
RUN
yum
-y
update
\
&&
yum clean all
&&
yum clean all
...
@@ -83,4 +81,4 @@ USER codesonar
...
@@ -83,4 +81,4 @@ USER codesonar
WORKDIR
/home/codesonar
WORKDIR
/home/codesonar
EXPOSE
7340/tcp
EXPOSE
7340/tcp
CMD
["sh", "-c", "/opt/codesonar-exec.sh
$HUB_DEFAULT_PWD
"]
CMD
["sh", "-c", "/opt/codesonar-exec.sh"]
scripts/codesonar-exec.sh
View file @
ae9a491f
#!/bin/sh
#!/bin/sh
echo
"Starting hub in /home/codesonar/hub"
if
test
-f
"/home/codesonar/hub/hubpwd"
;
then
echo
-e
"
$1
\n
$1
\n
"
| /opt/codesonar/codesonar/bin/codesonar hub-start /home/codesonar/hub 0.0.0.0:7340
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..."
echo
"Hub started..."
while
[
1
]
while
[
1
]
do
do
echo
"Hub running"
echo
"Hub running"
sleep
60
sleep
60
done
done
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment