1
0

Moved around template order

Signed-off-by: James P. Ketrenos <james.p.ketrenos@intel.com>
This commit is contained in:
James P. Ketrenos 2019-09-24 11:25:14 -07:00
parent 54298768b5
commit d4771df69b
2 changed files with 41 additions and 0 deletions

View File

@ -0,0 +1,19 @@
FROM base AS agama
# Update and install gpg-agent as it isn't in the base Ubuntu image and is needed for apt-key
RUN apt-get -q update \
&& DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends -q -y install \
wget \
gpg-agent \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/{apt,dpkg,cache,log}
# Fetch and install the signing key for OSGC's Agama repository
RUN wget --no-proxy --quiet -O /tmp/aptly.key http://osgc.jf.intel.com/packages/agama/ubuntu/aptly_repo_signing.key \
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=DontWarn apt-key add /tmp/aptly.key \
&& rm /tmp/aptly.key
# Add internal Agama repository
RUN apt-add-repository "deb [arch=amd64] http://osgc.jf.intel.com/packages/agama/ubuntu disco main"
RUN apt-get remove -y wget

View File

@ -0,0 +1,22 @@
# 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