GST-Tensordecoder-ov_ep/ci/scripts/create-container-user.sh
Jordan Petridis 5ce342f8fd ci: Move containeruser creation into the main image
Doesn't need to be done only for toolbox and we will
need this when we switch the user gitlab-ci runs as.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7816>
2025-04-12 10:11:28 +00:00

13 lines
276 B
Bash

#! /bin/bash
set -eux
uid="10043"
name="containeruser"
groupadd $name -g $uid
useradd -u $uid -g $uid -ms /bin/bash $name
usermod -aG wheel $name || usermod -aG sudo $name
bash -c "echo $name ALL=\(ALL\) NOPASSWD:ALL > /etc/sudoers.d/$name"
chmod 0440 /etc/sudoers.d/$name