kas-container: mount host paths below /var/kas

As we no longer create the builder user at runtime, placing data into
/etc/skel at runtime is semantically not correct anymore. Instead, we
bind mount host paths below /var/kas/userdata. By that, we now place
the data into a directory which is fully handled by us.

Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
Felix Moessbauer
2023-02-27 13:21:31 +01:00
committed by Jan Kiszka
parent f971cd363b
commit 06fad464b5
2 changed files with 10 additions and 10 deletions

View File

@@ -52,8 +52,8 @@ else
usermod -o --uid "$USER_ID" --gid "$GROUP_ID" builder >/dev/null
chown -R "$USER_ID":"$GROUP_ID" /builder
# copy host SSH config into home of builder
if [ -d /etc/skel/.ssh ]; then
cp -a /etc/skel/.ssh /builder/
if [ -d /var/kas/userdata/.ssh ]; then
cp -a /var/kas/userdata/.ssh /builder/
fi
GOSU="gosu builder"