1
0
intel-media-ffmpeg/templates/ubuntu/25-graphics-user.in
James Ketrenos 4ce032c530 Updated to lates xe-solutions
Signed-off-by: James Ketrenos <james.p.ketrenos@intel.com>
2019-11-13 13:40:48 -08:00

24 lines
674 B
Plaintext

# Create user 'graphics' and add them to 'sudo' for sudo access and set
# the passwd to 'graphics'
FROM graphics-base AS user-stage
RUN apt-get -q update \
&& DEBIAN_FRONTEND=noninteractive \
apt-get install --no-install-recommends -y \
sudo \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/{apt,dpkg,cache,log}
# NOTE: Requires 'sudo' package to already be installed
RUN groupadd -r graphics \
&& useradd --no-log-init \
-s /bin/bash \
-r -m \
-g graphics \
-G sudo \
-p $(echo "graphics" | openssl passwd -stdin) graphics
# Set 'sudo' to NOPASSWD for all container users
RUN sed -i -e 's,%sudo.*,%sudo ALL=(ALL) NOPASSWD:ALL,g' /etc/sudoers