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
O
Opensource
spark-operator
Spark Operator V1beta2 1.0.0
Commits
ed7a4bd2
Commit
ed7a4bd2
authored
Feb 22, 2021
by
Christopher Vernooy
Browse files
Update Dockerfile, scripts/entrypoint.sh files
parent
2d9eda53
Pipeline
#171497
passed with stages
in 17 minutes and 12 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
3 deletions
+30
-3
Dockerfile
Dockerfile
+3
-3
scripts/entrypoint.sh
scripts/entrypoint.sh
+27
-0
No files found.
Dockerfile
View file @
ed7a4bd2
...
...
@@ -9,13 +9,13 @@ RUN rm -rf /var/cache/dnf
COPY
--from=base /usr/bin/spark-operator /usr/bin/
COPY
tini /sbin/
RUN
chmod
+x /sbin/tini
COPY
--from=base /usr/bin
/gencerts.sh /usr/bin/
COPY
scripts
/gencerts.sh /usr/bin/
RUN
chmod
+x /usr/bin/gencerts.sh
COPY
--from=base /usr/bin
/entrypoint.sh /usr/bin/
COPY
scripts
/entrypoint.sh /usr/bin/
RUN
chmod
+x /usr/bin/entrypoint.sh
RUN
find /
-path
/proc
-prune
-o
-perm
/4000
-exec
chmod
u-s
{}
\;
RUN
find /
-path
/proc
-prune
-o
-perm
/2000
-exec
chmod
g-s
{}
\;
RUN
groupadd
-r
spark-operator
&&
useradd
-r
-g
spark-operator spark-operator
RUN
chown
-R
spark-operator /usr/bin
USER
spark-operator
ENTRYPOINT
["/usr/bin/entrypoint.sh"]
\ No newline at end of file
ENTRYPOINT
["/usr/bin/entrypoint.sh"]
scripts/entrypoint.sh
0 → 100644
View file @
ed7a4bd2
#!/bin/bash
# echo commands to the terminal output
set
-ex
# Check whether there is a passwd entry for the container UID
myuid
=
$(
id
-u
)
mygid
=
$(
id
-g
)
# turn off -e for getent because it will return error code in anonymous uid case
set
+e
uidentry
=
$(
getent passwd
$myuid
)
set
-e
echo
$myuid
echo
$mygid
echo
$uidentry
# If there is no passwd entry for the container UID, attempt to create one
if
[[
-z
"
$uidentry
"
]]
;
then
if
[[
-w
/etc/passwd
]]
;
then
echo
"
$myuid
:x:
$myuid
:
$mygid
:anonymous uid:
$SPARK_HOME
:/bin/false"
>>
/etc/passwd
else
echo
"Container ENTRYPOINT failed to add passwd entry for anonymous UID"
fi
fi
exec
/usr/bin/tini
-s
--
/usr/bin/spark-operator
"
$@
"
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