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
DIAT
AAP Python
Commits
1ae37e72
Commit
1ae37e72
authored
Aug 23, 2021
by
Jeffrey Weatherford
Browse files
Merge branch 'wingkwan.lau-development-patch-59643' into 'development'
Update Dockerfile See merge request
!22
parents
051d4c82
4650ccd9
Pipeline
#441044
passed with stages
in 8 minutes and 47 seconds
Changes
3
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
32 deletions
+1
-32
Dockerfile
Dockerfile
+1
-3
scripts/container-entrypoint
scripts/container-entrypoint
+0
-9
scripts/generate-container-user
scripts/generate-container-user
+0
-20
No files found.
Dockerfile
View file @
1ae37e72
...
...
@@ -24,10 +24,8 @@ ENV PROMPT_COMMAND=""
# Copy extra files to the image.
COPY
./scripts /usr/bin
RUN
chmod
a+x /usr/bin/container-entrypoint
&&
\
chmod
a+x /usr/bin/fix-permissions
&&
\
RUN
chmod
a+x /usr/bin/fix-permissions
&&
\
chmod
a+x /usr/bin/rpm-file-permissions
&&
\
chmod
a+x /usr/bin/generate-container-user
&&
\
chmod
a+x /usr/bin/py-enable
# yum Updates
...
...
scripts/container-entrypoint
deleted
100644 → 0
View file @
051d4c82
#!/bin/bash
# temp: hard coding "hero" as container username (todo: fix to use env vars for username and homedir)
if
[
`
id
-u
`
-ge
1
]
;
then
echo
"hero:x:
`
id
-u
`
:
`
id
-g
`
:here:/opt/app-root:/bin/bash"
>>
/etc/passwd
fi
exec
"
$@
"
scripts/generate-container-user
deleted
100644 → 0
View file @
051d4c82
# Set current user in nss_wrapper
USER_ID=$(id -u)
GROUP_ID=$(id -g)
if [ x"$USER_ID" != x"0" -a x"$USER_ID" != x"1001" ]; then
NSS_WRAPPER_PASSWD=/opt/app-root/etc/passwd
NSS_WRAPPER_GROUP=/etc/group
cat /etc/passwd | sed -e 's/^default:/builder:/' > $NSS_WRAPPER_PASSWD
echo "default:x:${USER_ID}:${GROUP_ID}:Default Application User:${HOME}:/sbin/nologin" >> $NSS_WRAPPER_PASSWD
export NSS_WRAPPER_PASSWD
export NSS_WRAPPER_GROUP
LD_PRELOAD=libnss_wrapper.so
export LD_PRELOAD
fi
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