1
0
James Ketrenos 82aba14ec6 Red Hat images can now be built and pushed. See README.md
Signed-off-by: James Ketrenos <james.p.ketrenos@intel.com>
2019-11-07 11:59:01 -08:00

23 lines
640 B
Plaintext

# Create user 'agama' and add them to 'sudo' for sudo access and set
# the passwd to 'agama'
FROM agama AS agama-user
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 agama \
&& useradd --no-log-init \
-s /bin/bash \
-r -m \
-g agama \
-G sudo \
-p $(echo "agama" | openssl passwd -stdin) agama
# Set 'sudo' to NOPASSWD for all container users
RUN sed -i -e 's,%sudo.*,%sudo ALL=(ALL) NOPASSWD:ALL,g' /etc/sudoers