1
0
intel-media-ffmpeg/templates/ubuntu/25-graphics-user.in
James Ketrenos bdb996e07e Updated to work with latest xe-solutions
Signed-off-by: James Ketrenos <james.p.ketrenos@intel.com>
2019-11-14 13:04:22 -08:00

27 lines
675 B
Plaintext

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