Updated to work with latest xe-solutions
Signed-off-by: James Ketrenos <james.p.ketrenos@intel.com>
This commit is contained in:
parent
4ce032c530
commit
bdb996e07e
109
Dockerfile
109
Dockerfile
@ -15,7 +15,7 @@
|
|||||||
# Template from templates/ubuntu/00-FROM.in
|
# Template from templates/ubuntu/00-FROM.in
|
||||||
#
|
#
|
||||||
# Pull from ubuntu on Docker Hub
|
# Pull from ubuntu on Docker Hub
|
||||||
FROM ubuntu:disco AS graphics-base
|
FROM ubuntu:disco AS xe-base-stage
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -32,15 +32,31 @@ RUN { \
|
|||||||
done \
|
done \
|
||||||
} > /etc/apt/sources.list
|
} > /etc/apt/sources.list
|
||||||
|
|
||||||
|
ARG http_proxy="http://proxy-chain.intel.com:911/"
|
||||||
|
ARG https_proxy="http://proxy-chain.intel.com:912/"
|
||||||
|
ARG ftp_proxy="ftp://proxy-chain.intel.com:911/"
|
||||||
|
ARG socks_proxy="socks://proxy-chain.intel.com:1080/"
|
||||||
|
ARG no_proxy="localhost,*.*.intel.com"
|
||||||
|
|
||||||
|
ENV http_proxy="${http_proxy}"
|
||||||
|
ENV https_proxy="${https_proxy}"
|
||||||
|
ENV no_proxy="${no_proxy}"
|
||||||
|
ENV ftp_proxy="${http_proxy}"
|
||||||
|
ENV socks_proxy="${socks_proxy}"
|
||||||
|
|
||||||
|
ENV HTTP_PROXY="${http_proxy}"
|
||||||
|
ENV HTTPS_PROXY="${http_proxy}"
|
||||||
|
ENV NO_PROXY="${no_proxy}"
|
||||||
|
|
||||||
RUN { \
|
RUN { \
|
||||||
echo "Acquire::http::proxy \"http://proxy-chain.intel.com:911/\";\n" ; \
|
echo "Acquire::http::proxy \"${http_proxy}\";\n" ; \
|
||||||
echo "Acquire::https::proxy \"http://proxy-chain.intel.com:912/\";\n" ; \
|
echo "Acquire::https::proxy \"${https_proxy}\";\n" ; \
|
||||||
echo "Acquire::ftp::proxy \"ftp://proxy-chain.intel.com:911/\";\n" ; \
|
echo "Acquire::ftp::proxy \"${ftp_proxy}\";\n" ; \
|
||||||
echo "Acquire::socks::proxy \"socks://proxy-chain.intel.com:1080/\";\n" ; \
|
echo "Acquire::socks::proxy \"${socks_proxy}\";\n" ; \
|
||||||
echo "Acquire::http::Proxy::linux-ftp.ostc.intel.com DIRECT;\n" ; \
|
echo "Acquire::http::Proxy::linux-ftp.ostc.intel.com DIRECT;\n" ; \
|
||||||
echo "Acquire::http::Proxy::osgc.jf.intel.com DIRECT;\n" ; \
|
|
||||||
} > /etc/apt/apt.conf
|
} > /etc/apt/apt.conf
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Template from templates/ubuntu/08-intel-certs.in
|
# Template from templates/ubuntu/08-intel-certs.in
|
||||||
#
|
#
|
||||||
@ -85,8 +101,6 @@ ENV LANG=en_US.UTF-8 LANGUAGE=en_US.UTF-8 LC_ALL=en_US.UTF-8
|
|||||||
#
|
#
|
||||||
# Template from templates/ubuntu/20-repositories-intel-com.in
|
# Template from templates/ubuntu/20-repositories-intel-com.in
|
||||||
#
|
#
|
||||||
FROM base AS graphics-base
|
|
||||||
|
|
||||||
# Once we have a signed repository:
|
# Once we have a signed repository:
|
||||||
#
|
#
|
||||||
# Update and install gpg-agent as it isn't in the base Ubuntu image and
|
# Update and install gpg-agent as it isn't in the base Ubuntu image and
|
||||||
@ -120,30 +134,33 @@ RUN echo "deb [trusted=yes arch=amd64] https://repositories.intel.com/graphics/u
|
|||||||
#
|
#
|
||||||
# Template from templates/ubuntu/25-graphics-user.in
|
# Template from templates/ubuntu/25-graphics-user.in
|
||||||
#
|
#
|
||||||
# Create user 'graphics' and add them to 'sudo' for sudo access and set
|
# Create user 'user' and add them to 'sudo' for sudo access and set
|
||||||
# the passwd to 'graphics'
|
# the passwd to 'user'
|
||||||
|
|
||||||
FROM graphics-base AS user-stage
|
FROM xe-base-stage AS xe-user-stage
|
||||||
|
|
||||||
RUN apt-get -q update \
|
RUN apt-get -q update \
|
||||||
&& DEBIAN_FRONTEND=noninteractive \
|
&& DEBIAN_FRONTEND=noninteractive \
|
||||||
apt-get install --no-install-recommends -y \
|
&& apt-get install --no-install-recommends -y \
|
||||||
sudo \
|
sudo
|
||||||
&& apt-get clean \
|
|
||||||
&& rm -rf /var/lib/apt/lists/{apt,dpkg,cache,log}
|
|
||||||
|
|
||||||
# NOTE: Requires 'sudo' package to already be installed
|
# NOTE: Requires 'sudo' package to already be installed
|
||||||
RUN groupadd -r graphics \
|
RUN groupadd -r user \
|
||||||
&& useradd --no-log-init \
|
&& useradd --no-log-init \
|
||||||
-s /bin/bash \
|
-s /bin/bash \
|
||||||
-r -m \
|
-r -m \
|
||||||
-g graphics \
|
-g user \
|
||||||
-G sudo \
|
-G sudo \
|
||||||
-p $(echo "graphics" | openssl passwd -stdin) graphics
|
-p $(echo "user" | openssl passwd -stdin) user
|
||||||
|
|
||||||
# Set 'sudo' to NOPASSWD for all container users
|
# Set 'sudo' to NOPASSWD for all container users
|
||||||
RUN sed -i -e 's,%sudo.*,%sudo ALL=(ALL) NOPASSWD:ALL,g' /etc/sudoers
|
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
|
||||||
|
|
||||||
#
|
#
|
||||||
# Solution begins here (from Dockerfile.solution)
|
# Solution begins here (from Dockerfile.solution)
|
||||||
#
|
#
|
||||||
@ -156,59 +173,71 @@ RUN sed -i -e 's,%sudo.*,%sudo ALL=(ALL) NOPASSWD:ALL,g' /etc/sudoers
|
|||||||
# image isn't polluted with build artifacts
|
# image isn't polluted with build artifacts
|
||||||
#
|
#
|
||||||
# NOTE: This image will only work with Ubuntu 19.04 (disco) and newer
|
# NOTE: This image will only work with Ubuntu 19.04 (disco) and newer
|
||||||
FROM user-stage AS solution-build
|
FROM xe-user-stage AS solution-build
|
||||||
|
|
||||||
|
USER root
|
||||||
|
|
||||||
# Install git and build tools, clone ffmpeg, and get ready to build it
|
# Install git and build tools, clone ffmpeg, and get ready to build it
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& DEBIAN_FRONTEND=noninteractive apt-get -q -y install \
|
&& DEBIAN_FRONTEND=noninteractive \
|
||||||
|
&& apt-get -q -y install \
|
||||||
git build-essential pkg-config
|
git build-essential pkg-config
|
||||||
|
|
||||||
# Clone ffmpeg
|
# Install all required Media common packages, broken out
|
||||||
# NOTE: This explicitly clones the FFMPEG_TAG_VERSION (see SOLUTIONS)
|
# from the above command to highlight which packages are
|
||||||
RUN git clone --depth 1 --branch n4.2.1 https://github.com/ffmpeg/ffmpeg /home/graphics/ffmpeg
|
# specific to media
|
||||||
|
|
||||||
# Install all required common packages:
|
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& DEBIAN_FRONTEND=noninteractive apt-get -q -y install \
|
&& DEBIAN_FRONTEND=noninteractive \
|
||||||
|
&& apt-get -q -y install \
|
||||||
libva-dev$LIBVA_DEV_VERSION \
|
libva-dev$LIBVA_DEV_VERSION \
|
||||||
libmfx-dev$LIBMFX_DEV_VERSION \
|
libmfx-dev$LIBMFX_DEV_VERSION \
|
||||||
libmfx1$LIBMFX1_VERSION \
|
libmfx1$LIBMFX1_VERSION \
|
||||||
vainfo$VAINFO_VERSION \
|
vainfo$VAINFO_VERSION
|
||||||
&& apt-get clean \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
ENV LIBVA_DRIVER_NAME=iHD
|
ENV LIBVA_DRIVER_NAME=iHD
|
||||||
|
|
||||||
|
USER user
|
||||||
|
|
||||||
|
# Clone ffmpeg
|
||||||
|
# NOTE: This explicitly clones the FFMPEG_TAG_VERSION (see SOLUTIONS)
|
||||||
|
RUN git clone --depth 1 --branch n4.2.1 https://github.com/ffmpeg/ffmpeg /home/user/ffmpeg
|
||||||
|
|
||||||
# Build FFmpeg
|
# Build FFmpeg
|
||||||
WORKDIR /home/graphics/ffmpeg
|
WORKDIR /home/user/ffmpeg
|
||||||
|
|
||||||
RUN ./configure --arch=x86_64 --disable-yasm --enable-vaapi --enable-libmfx \
|
RUN ./configure --arch=x86_64 --disable-yasm --enable-vaapi --enable-libmfx \
|
||||||
&& make -j $(nproc --all) \
|
&& make -j $(nproc --all) \
|
||||||
&& make install
|
&& sudo make install
|
||||||
|
|
||||||
FROM user-stage
|
FROM xe-user-stage
|
||||||
|
|
||||||
ENV LIBVA_DRIVER_NAME=iHD
|
USER root
|
||||||
|
|
||||||
# Update and install the Mesa, OpenCL, and Media from repositories.intel.com
|
# Update and install the Mesa, OpenCL, and Media from repositories.intel.com
|
||||||
#
|
#
|
||||||
# NOTE: libva requires libpciaccess0, however it doesn't depend on it
|
# NOTE: libva requires libpciaccess0, however it doesn't depend on it
|
||||||
# so explicitly install it.
|
# so explicitly install it.
|
||||||
RUN apt-get -q update \
|
RUN apt-get -q update \
|
||||||
&& DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends -q -y install \
|
&& DEBIAN_FRONTEND=noninteractive \
|
||||||
|
&& apt-get --no-install-recommends -q -y install \
|
||||||
intel-media-va-driver-non-free$INTEL_MEDIA_VA_DRIVER_NON_FREE_VERSION \
|
intel-media-va-driver-non-free$INTEL_MEDIA_VA_DRIVER_NON_FREE_VERSION \
|
||||||
libva2$LIBVA2_VERSION \
|
libva2$LIBVA2_VERSION \
|
||||||
libmfx1$LIBMFX1_VERSION \
|
libmfx1$LIBMFX1_VERSION \
|
||||||
vainfo$VAINFO_VERSION \
|
vainfo$VAINFO_VERSION \
|
||||||
libpciaccess0 \
|
libpciaccess0 \
|
||||||
pciutils \
|
pciutils
|
||||||
&& apt-get clean \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
# Copy ffmpeg and ffprobe from build container
|
# Copy ffmpeg and ffprobe from build container
|
||||||
COPY --from=solution-build /usr/local/bin/ /usr/local/bin/
|
COPY --from=solution-build /usr/local/bin/ /usr/local/bin/
|
||||||
|
|
||||||
WORKDIR /home/graphics
|
RUN apt-get clean \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
ENV LIBVA_DRIVER_NAME=iHD
|
||||||
|
|
||||||
|
USER user
|
||||||
|
WORKDIR /home/user
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Standard ending begins here (from templates/ending.in)
|
# Standard ending begins here (from templates/ending.in)
|
||||||
@ -231,6 +260,6 @@ RUN { \
|
|||||||
echo "PACKAGE_STREAM=disco" ; \
|
echo "PACKAGE_STREAM=disco" ; \
|
||||||
echo "OS_DISTRO=ubuntu" ; \
|
echo "OS_DISTRO=ubuntu" ; \
|
||||||
echo "OS_RELEASE=disco" ; \
|
echo "OS_RELEASE=disco" ; \
|
||||||
} > /assets/SOLUTION
|
} | sudo tee /assets/SOLUTION
|
||||||
COPY MANIFEST /assets/
|
COPY MANIFEST /assets/
|
||||||
COPY Dockerfile /assets/Dockerfile
|
COPY Dockerfile /assets/Dockerfile
|
||||||
|
@ -12,17 +12,45 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
#
|
#
|
||||||
# Template from templates/rhel/00-everything.in
|
# Template from templates/rhel/00-from.in
|
||||||
#
|
#
|
||||||
FROM dockerv2-gfx-build.gfx-assets.intel.com/upstream/rhel:8.0.0 AS user-stage
|
# Pull internal RHEL image
|
||||||
|
FROM dockerv2-gfx-build.gfx-assets.intel.com/upstream/rhel:8.0.0 AS xe-base-stage
|
||||||
|
|
||||||
|
# Flush cached package lists to prevent stale data
|
||||||
|
RUN dnf clean all
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Template from templates/rhel/05-intel-proxy.in
|
||||||
|
#
|
||||||
|
# Configure Intel proxy values
|
||||||
|
|
||||||
|
ARG http_proxy="http://proxy-chain.intel.com:911/"
|
||||||
|
ARG https_proxy="http://proxy-chain.intel.com:912/"
|
||||||
|
ARG ftp_proxy="ftp://proxy-chain.intel.com:911/"
|
||||||
|
ARG socks_proxy="socks://proxy-chain.intel.com:1080/"
|
||||||
|
ARG no_proxy="localhost,*.*.intel.com"
|
||||||
|
|
||||||
|
ENV http_proxy="${http_proxy}"
|
||||||
|
ENV https_proxy="${https_proxy}"
|
||||||
|
ENV no_proxy="${no_proxy}"
|
||||||
|
ENV ftp_proxy="${http_proxy}"
|
||||||
|
ENV socks_proxy="${socks_proxy}"
|
||||||
|
|
||||||
|
ENV HTTP_PROXY="${http_proxy}"
|
||||||
|
ENV HTTPS_PROXY="${http_proxy}"
|
||||||
|
ENV NO_PROXY="${no_proxy}"
|
||||||
|
|
||||||
# Configure DNF and YUM proxies
|
# Configure DNF and YUM proxies
|
||||||
RUN echo "proxy=http://proxy-chain.intel.com:911" >> /etc/dnf/dnf.conf \
|
RUN { \
|
||||||
&& echo -e 'proxy=http://proxy-chain.intel.com:911\nno_proxy=.intel.com' >> /etc/yum.conf
|
echo "proxy=${http_proxy}" ; \
|
||||||
|
echo "no_proxy=${no_proxy}" ; \
|
||||||
# Remove any pre-configured repositories
|
} | tee -a /etc/dnf/dnf.conf /etc/yum.conf
|
||||||
RUN rm -rf /etc/yum.repos.d/*
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Template from templates/rhel/10-rhel-partner.in
|
||||||
|
#
|
||||||
# Install the Red Hat partner repositories
|
# Install the Red Hat partner repositories
|
||||||
RUN { \
|
RUN { \
|
||||||
echo "[RHEL-8-appstream-partners]" ; \
|
echo "[RHEL-8-appstream-partners]" ; \
|
||||||
@ -181,12 +209,10 @@ RUN { \
|
|||||||
echo "" ; \
|
echo "" ; \
|
||||||
} > /etc/yum.repos.d/RHEL-8-rt-intel-partner.repo
|
} > /etc/yum.repos.d/RHEL-8-rt-intel-partner.repo
|
||||||
|
|
||||||
# Update package lists, and upgrade to the latest Red Hat packages
|
#
|
||||||
RUN dnf clean all \
|
# Template from templates/rhel/20-repositories-intel-com.in
|
||||||
&& dnf -y upgrade \
|
#
|
||||||
&& dnf clean all
|
# repositories.intel.com content begins here
|
||||||
|
|
||||||
# repositories.intel.com specific content begins here
|
|
||||||
#
|
#
|
||||||
# Intel certificates which would allow internal signed certs to be
|
# Intel certificates which would allow internal signed certs to be
|
||||||
# used are not being installed, so turn sslverify=0 on the
|
# used are not being installed, so turn sslverify=0 on the
|
||||||
@ -211,8 +237,35 @@ RUN { \
|
|||||||
echo "gpgcheck=0" ; \
|
echo "gpgcheck=0" ; \
|
||||||
} > /etc/yum.repos.d/intel-graphics.repo
|
} > /etc/yum.repos.d/intel-graphics.repo
|
||||||
|
|
||||||
# Disable proxy for Intel URLs
|
#
|
||||||
RUN echo "no_proxy=.jf.intel.com" >> /etc/yum.conf
|
# Template from templates/rhel/25-graphics-user.in
|
||||||
|
#
|
||||||
|
# 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 dnf install -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
|
||||||
|
|
||||||
|
USER user
|
||||||
|
|
||||||
|
#
|
||||||
|
# Template from templates/rhel/30-clean-up.in
|
||||||
|
#
|
||||||
|
# Clean dnf cache
|
||||||
|
RUN dnf clean all
|
||||||
|
|
||||||
#
|
#
|
||||||
# Solution begins here (from Dockerfile.solution.rhel-8.0)
|
# Solution begins here (from Dockerfile.solution.rhel-8.0)
|
||||||
@ -225,53 +278,60 @@ RUN echo "no_proxy=.jf.intel.com" >> /etc/yum.conf
|
|||||||
# image isn't polluted with build artifacts
|
# image isn't polluted with build artifacts
|
||||||
#
|
#
|
||||||
# NOTE: This image will only work with Ubuntu 19.04 (disco) and newer
|
# NOTE: This image will only work with Ubuntu 19.04 (disco) and newer
|
||||||
FROM user-stage AS solution-build
|
FROM xe-user-stage AS solution-build
|
||||||
|
|
||||||
|
USER root
|
||||||
|
|
||||||
# Install git and build tools, clone ffmpeg, and get ready to build it
|
# Install git and build tools, clone ffmpeg, and get ready to build it
|
||||||
RUN dnf groupinstall -y 'Development Tools'
|
RUN dnf groupinstall -y 'Development Tools'
|
||||||
|
|
||||||
# Clone ffmpeg
|
|
||||||
# NOTE: This explicitly clones the FFMPEG_TAG_VERSION (see SOLUTIONS)
|
|
||||||
RUN git clone --depth 1 --branch n4.2.1 https://github.com/ffmpeg/ffmpeg /ffmpeg
|
|
||||||
|
|
||||||
# Install all required common packages:
|
# Install all required common packages:
|
||||||
# Adapted from
|
# Adapted from
|
||||||
RUN dnf install -y \
|
RUN dnf install -y \
|
||||||
libva-devel$LIBVA_DEV_VERSION \
|
libva-devel$LIBVA_DEV_VERSION \
|
||||||
intel-mediasdk-devel$INTEL_MEDIASDK_DEVEL_VERSION \
|
intel-mediasdk-devel$INTEL_MEDIASDK_DEVEL_VERSION \
|
||||||
libva-utils$LIBVA_UTILS_VERSION \
|
libva-utils$LIBVA_UTILS_VERSION
|
||||||
&& dnf clean all
|
|
||||||
|
|
||||||
ENV LIBVA_DRIVER_NAME=iHD
|
USER user
|
||||||
|
|
||||||
|
# Clone ffmpeg
|
||||||
|
# NOTE: This explicitly clones the FFMPEG_TAG_VERSION (see SOLUTIONS)
|
||||||
|
RUN git clone --depth 1 --branch n4.2.1 https://github.com/ffmpeg/ffmpeg /home/user/ffmpeg
|
||||||
|
|
||||||
# Build FFmpeg
|
# Build FFmpeg
|
||||||
WORKDIR /ffmpeg
|
WORKDIR /home/user/ffmpeg
|
||||||
|
|
||||||
|
ENV LIBVA_DRIVER_NAME=iHD
|
||||||
|
|
||||||
RUN ./configure --arch=x86_64 --disable-yasm --enable-vaapi --enable-libmfx \
|
RUN ./configure --arch=x86_64 --disable-yasm --enable-vaapi --enable-libmfx \
|
||||||
&& make -j $(nproc --all) \
|
&& make -j $(nproc --all) \
|
||||||
&& make install
|
&& sudo make install
|
||||||
|
|
||||||
FROM user-stage
|
FROM xe-user-stage
|
||||||
|
|
||||||
ENV LIBVA_DRIVER_NAME=iHD
|
USER root
|
||||||
|
|
||||||
# Update and install the Mesa, OpenCL, and Media from repositories.intel.com
|
# Update and install the Mesa, OpenCL, and Media from repositories.intel.com
|
||||||
#
|
#
|
||||||
# NOTE: libva requires libpciaccess0, however it doesn't depend on it
|
# NOTE: libva requires libpciaccess0, however it doesn't depend on it
|
||||||
# so explicitly install it.
|
# so explicitly install it.
|
||||||
# intel-media-va-driver-non-free$INTEL_MEDIA_VA_DRIVER_NON_FREE_VERSION \
|
|
||||||
RUN dnf install -y \
|
RUN dnf install -y \
|
||||||
intel-media$INTEL_MEDIA_VERSION \
|
intel-media$INTEL_MEDIA_VERSION \
|
||||||
libva$LIBVA_VERSION \
|
libva$LIBVA_VERSION \
|
||||||
intel-mediasdk$INTEL_MEDIASDK_VERSION \
|
intel-mediasdk$INTEL_MEDIASDK_VERSION \
|
||||||
libva-utils$LIBVA_UTILS_VERSION \
|
libva-utils$LIBVA_UTILS_VERSION \
|
||||||
libpciaccess \
|
libpciaccess \
|
||||||
pciutils \
|
pciutils
|
||||||
&& dnf clean all
|
|
||||||
|
|
||||||
# Copy ffmpeg and ffprobe from build container
|
# Copy ffmpeg and ffprobe from build container
|
||||||
COPY --from=solution-build /usr/local/bin/ /usr/local/bin/
|
COPY --from=solution-build /usr/local/bin/ /usr/local/bin/
|
||||||
|
|
||||||
|
RUN dnf clean all
|
||||||
|
|
||||||
|
ENV LIBVA_DRIVER_NAME=iHD
|
||||||
|
|
||||||
|
USER user
|
||||||
|
|
||||||
#
|
#
|
||||||
# Standard ending begins here (from templates/ending.in)
|
# Standard ending begins here (from templates/ending.in)
|
||||||
#
|
#
|
||||||
@ -293,6 +353,6 @@ RUN { \
|
|||||||
echo "PACKAGE_STREAM=8.0" ; \
|
echo "PACKAGE_STREAM=8.0" ; \
|
||||||
echo "OS_DISTRO=rhel" ; \
|
echo "OS_DISTRO=rhel" ; \
|
||||||
echo "OS_RELEASE=8.0" ; \
|
echo "OS_RELEASE=8.0" ; \
|
||||||
} > /assets/SOLUTION
|
} | sudo tee /assets/SOLUTION
|
||||||
COPY MANIFEST /assets/
|
COPY MANIFEST /assets/
|
||||||
COPY Dockerfile.rhel-8.0 /assets/Dockerfile
|
COPY Dockerfile.rhel-8.0 /assets/Dockerfile
|
||||||
|
@ -7,56 +7,68 @@
|
|||||||
# image isn't polluted with build artifacts
|
# image isn't polluted with build artifacts
|
||||||
#
|
#
|
||||||
# NOTE: This image will only work with Ubuntu 19.04 (disco) and newer
|
# NOTE: This image will only work with Ubuntu 19.04 (disco) and newer
|
||||||
FROM user-stage AS solution-build
|
FROM xe-user-stage AS solution-build
|
||||||
|
|
||||||
|
USER root
|
||||||
|
|
||||||
# Install git and build tools, clone ffmpeg, and get ready to build it
|
# Install git and build tools, clone ffmpeg, and get ready to build it
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& DEBIAN_FRONTEND=noninteractive apt-get -q -y install \
|
&& DEBIAN_FRONTEND=noninteractive \
|
||||||
|
&& apt-get -q -y install \
|
||||||
git build-essential pkg-config
|
git build-essential pkg-config
|
||||||
|
|
||||||
# Clone ffmpeg
|
# Install all required Media common packages, broken out
|
||||||
# NOTE: This explicitly clones the FFMPEG_TAG_VERSION (see SOLUTIONS)
|
# from the above command to highlight which packages are
|
||||||
RUN git clone --depth 1 --branch $FFMPEG_TAG_VERSION https://github.com/ffmpeg/ffmpeg /home/graphics/ffmpeg
|
# specific to media
|
||||||
|
|
||||||
# Install all required common packages:
|
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& DEBIAN_FRONTEND=noninteractive apt-get -q -y install \
|
&& DEBIAN_FRONTEND=noninteractive \
|
||||||
|
&& apt-get -q -y install \
|
||||||
libva-dev$LIBVA_DEV_VERSION \
|
libva-dev$LIBVA_DEV_VERSION \
|
||||||
libmfx-dev$LIBMFX_DEV_VERSION \
|
libmfx-dev$LIBMFX_DEV_VERSION \
|
||||||
libmfx1$LIBMFX1_VERSION \
|
libmfx1$LIBMFX1_VERSION \
|
||||||
vainfo$VAINFO_VERSION \
|
vainfo$VAINFO_VERSION
|
||||||
&& apt-get clean \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
ENV LIBVA_DRIVER_NAME=iHD
|
ENV LIBVA_DRIVER_NAME=iHD
|
||||||
|
|
||||||
|
USER user
|
||||||
|
|
||||||
|
# Clone ffmpeg
|
||||||
|
# NOTE: This explicitly clones the FFMPEG_TAG_VERSION (see SOLUTIONS)
|
||||||
|
RUN git clone --depth 1 --branch $FFMPEG_TAG_VERSION https://github.com/ffmpeg/ffmpeg /home/user/ffmpeg
|
||||||
|
|
||||||
# Build FFmpeg
|
# Build FFmpeg
|
||||||
WORKDIR /home/graphics/ffmpeg
|
WORKDIR /home/user/ffmpeg
|
||||||
|
|
||||||
RUN ./configure --arch=x86_64 --disable-yasm --enable-vaapi --enable-libmfx \
|
RUN ./configure --arch=x86_64 --disable-yasm --enable-vaapi --enable-libmfx \
|
||||||
&& make -j $(nproc --all) \
|
&& make -j $(nproc --all) \
|
||||||
&& make install
|
&& sudo make install
|
||||||
|
|
||||||
FROM user-stage
|
FROM xe-user-stage
|
||||||
|
|
||||||
ENV LIBVA_DRIVER_NAME=iHD
|
USER root
|
||||||
|
|
||||||
# Update and install the Mesa, OpenCL, and Media from repositories.intel.com
|
# Update and install the Mesa, OpenCL, and Media from repositories.intel.com
|
||||||
#
|
#
|
||||||
# NOTE: libva requires libpciaccess0, however it doesn't depend on it
|
# NOTE: libva requires libpciaccess0, however it doesn't depend on it
|
||||||
# so explicitly install it.
|
# so explicitly install it.
|
||||||
RUN apt-get -q update \
|
RUN apt-get -q update \
|
||||||
&& DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends -q -y install \
|
&& DEBIAN_FRONTEND=noninteractive \
|
||||||
|
&& apt-get --no-install-recommends -q -y install \
|
||||||
intel-media-va-driver-non-free$INTEL_MEDIA_VA_DRIVER_NON_FREE_VERSION \
|
intel-media-va-driver-non-free$INTEL_MEDIA_VA_DRIVER_NON_FREE_VERSION \
|
||||||
libva2$LIBVA2_VERSION \
|
libva2$LIBVA2_VERSION \
|
||||||
libmfx1$LIBMFX1_VERSION \
|
libmfx1$LIBMFX1_VERSION \
|
||||||
vainfo$VAINFO_VERSION \
|
vainfo$VAINFO_VERSION \
|
||||||
libpciaccess0 \
|
libpciaccess0 \
|
||||||
pciutils \
|
pciutils
|
||||||
&& apt-get clean \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
# Copy ffmpeg and ffprobe from build container
|
# Copy ffmpeg and ffprobe from build container
|
||||||
COPY --from=solution-build /usr/local/bin/ /usr/local/bin/
|
COPY --from=solution-build /usr/local/bin/ /usr/local/bin/
|
||||||
|
|
||||||
WORKDIR /home/graphics
|
RUN apt-get clean \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
ENV LIBVA_DRIVER_NAME=iHD
|
||||||
|
|
||||||
|
USER user
|
||||||
|
WORKDIR /home/user
|
||||||
|
|
||||||
|
@ -6,49 +6,56 @@
|
|||||||
# image isn't polluted with build artifacts
|
# image isn't polluted with build artifacts
|
||||||
#
|
#
|
||||||
# NOTE: This image will only work with Ubuntu 19.04 (disco) and newer
|
# NOTE: This image will only work with Ubuntu 19.04 (disco) and newer
|
||||||
FROM user-stage AS solution-build
|
FROM xe-user-stage AS solution-build
|
||||||
|
|
||||||
|
USER root
|
||||||
|
|
||||||
# Install git and build tools, clone ffmpeg, and get ready to build it
|
# Install git and build tools, clone ffmpeg, and get ready to build it
|
||||||
RUN dnf groupinstall -y 'Development Tools'
|
RUN dnf groupinstall -y 'Development Tools'
|
||||||
|
|
||||||
# Clone ffmpeg
|
|
||||||
# NOTE: This explicitly clones the FFMPEG_TAG_VERSION (see SOLUTIONS)
|
|
||||||
RUN git clone --depth 1 --branch $FFMPEG_TAG_VERSION https://github.com/ffmpeg/ffmpeg /ffmpeg
|
|
||||||
|
|
||||||
# Install all required common packages:
|
# Install all required common packages:
|
||||||
# Adapted from
|
# Adapted from
|
||||||
RUN dnf install -y \
|
RUN dnf install -y \
|
||||||
libva-devel$LIBVA_DEV_VERSION \
|
libva-devel$LIBVA_DEV_VERSION \
|
||||||
intel-mediasdk-devel$INTEL_MEDIASDK_DEVEL_VERSION \
|
intel-mediasdk-devel$INTEL_MEDIASDK_DEVEL_VERSION \
|
||||||
libva-utils$LIBVA_UTILS_VERSION \
|
libva-utils$LIBVA_UTILS_VERSION
|
||||||
&& dnf clean all
|
|
||||||
|
|
||||||
ENV LIBVA_DRIVER_NAME=iHD
|
USER user
|
||||||
|
|
||||||
|
# Clone ffmpeg
|
||||||
|
# NOTE: This explicitly clones the FFMPEG_TAG_VERSION (see SOLUTIONS)
|
||||||
|
RUN git clone --depth 1 --branch $FFMPEG_TAG_VERSION https://github.com/ffmpeg/ffmpeg /home/user/ffmpeg
|
||||||
|
|
||||||
# Build FFmpeg
|
# Build FFmpeg
|
||||||
WORKDIR /ffmpeg
|
WORKDIR /home/user/ffmpeg
|
||||||
|
|
||||||
|
ENV LIBVA_DRIVER_NAME=iHD
|
||||||
|
|
||||||
RUN ./configure --arch=x86_64 --disable-yasm --enable-vaapi --enable-libmfx \
|
RUN ./configure --arch=x86_64 --disable-yasm --enable-vaapi --enable-libmfx \
|
||||||
&& make -j $(nproc --all) \
|
&& make -j $(nproc --all) \
|
||||||
&& make install
|
&& sudo make install
|
||||||
|
|
||||||
FROM user-stage
|
FROM xe-user-stage
|
||||||
|
|
||||||
ENV LIBVA_DRIVER_NAME=iHD
|
USER root
|
||||||
|
|
||||||
# Update and install the Mesa, OpenCL, and Media from repositories.intel.com
|
# Update and install the Mesa, OpenCL, and Media from repositories.intel.com
|
||||||
#
|
#
|
||||||
# NOTE: libva requires libpciaccess0, however it doesn't depend on it
|
# NOTE: libva requires libpciaccess0, however it doesn't depend on it
|
||||||
# so explicitly install it.
|
# so explicitly install it.
|
||||||
# intel-media-va-driver-non-free$INTEL_MEDIA_VA_DRIVER_NON_FREE_VERSION \
|
|
||||||
RUN dnf install -y \
|
RUN dnf install -y \
|
||||||
intel-media$INTEL_MEDIA_VERSION \
|
intel-media$INTEL_MEDIA_VERSION \
|
||||||
libva$LIBVA_VERSION \
|
libva$LIBVA_VERSION \
|
||||||
intel-mediasdk$INTEL_MEDIASDK_VERSION \
|
intel-mediasdk$INTEL_MEDIASDK_VERSION \
|
||||||
libva-utils$LIBVA_UTILS_VERSION \
|
libva-utils$LIBVA_UTILS_VERSION \
|
||||||
libpciaccess \
|
libpciaccess \
|
||||||
pciutils \
|
pciutils
|
||||||
&& dnf clean all
|
|
||||||
|
|
||||||
# Copy ffmpeg and ffprobe from build container
|
# Copy ffmpeg and ffprobe from build container
|
||||||
COPY --from=solution-build /usr/local/bin/ /usr/local/bin/
|
COPY --from=solution-build /usr/local/bin/ /usr/local/bin/
|
||||||
|
|
||||||
|
RUN dnf clean all
|
||||||
|
|
||||||
|
ENV LIBVA_DRIVER_NAME=iHD
|
||||||
|
|
||||||
|
USER user
|
||||||
|
6
templates/centos/00-from.in
Normal file
6
templates/centos/00-from.in
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
# Pull $OS_DISTRO from Docker Hub
|
||||||
|
FROM $OS_DISTRO:$OS_RELEASE as xe-base-stage
|
||||||
|
|
||||||
|
# Flush cached package lists to prevent stale data
|
||||||
|
RUN dnf clean all
|
||||||
|
|
23
templates/centos/05-intel-proxy.in
Normal file
23
templates/centos/05-intel-proxy.in
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# Configure Intel proxy values
|
||||||
|
|
||||||
|
ARG http_proxy="http://proxy-chain.intel.com:911/"
|
||||||
|
ARG https_proxy="http://proxy-chain.intel.com:912/"
|
||||||
|
ARG ftp_proxy="ftp://proxy-chain.intel.com:911/"
|
||||||
|
ARG socks_proxy="socks://proxy-chain.intel.com:1080/"
|
||||||
|
ARG no_proxy="localhost,*.*.intel.com"
|
||||||
|
|
||||||
|
ENV http_proxy="${http_proxy}"
|
||||||
|
ENV https_proxy="${https_proxy}"
|
||||||
|
ENV no_proxy="${no_proxy}"
|
||||||
|
ENV ftp_proxy="${http_proxy}"
|
||||||
|
ENV socks_proxy="${socks_proxy}"
|
||||||
|
|
||||||
|
ENV HTTP_PROXY="${http_proxy}"
|
||||||
|
ENV HTTPS_PROXY="${http_proxy}"
|
||||||
|
ENV NO_PROXY="${no_proxy}"
|
||||||
|
|
||||||
|
# Configure DNF and YUM proxies
|
||||||
|
RUN { \
|
||||||
|
echo "proxy=${http_proxy}" ; \
|
||||||
|
echo "no_proxy=${no_proxy}" ; \
|
||||||
|
} | tee -a /etc/dnf/dnf.conf /etc/yum.conf
|
@ -1,15 +1,3 @@
|
|||||||
# Pull $OS_DISTRO from Docker Hub
|
|
||||||
FROM $OS_DISTRO:$OS_RELEASE as user-stage
|
|
||||||
|
|
||||||
# Configure DNF and YUM proxies
|
|
||||||
RUN echo "proxy=http://proxy-chain.intel.com:911" >> /etc/dnf/dnf.conf \
|
|
||||||
&& echo -e 'proxy=http://proxy-chain.intel.com:911\nno_proxy=.intel.com' >> /etc/yum.conf
|
|
||||||
|
|
||||||
# Update package lists, and upgrade to the latest Red Hat packages
|
|
||||||
RUN dnf clean all \
|
|
||||||
&& dnf -y upgrade \
|
|
||||||
&& dnf clean all
|
|
||||||
|
|
||||||
# repositories.intel.com content begins here
|
# repositories.intel.com content begins here
|
||||||
#
|
#
|
||||||
# Intel certificates which would allow internal signed certs to be
|
# Intel certificates which would allow internal signed certs to be
|
||||||
@ -34,6 +22,3 @@ RUN { \
|
|||||||
echo "enabled=1" ; \
|
echo "enabled=1" ; \
|
||||||
echo "gpgcheck=0" ; \
|
echo "gpgcheck=0" ; \
|
||||||
} > /etc/yum.repos.d/intel-graphics.repo
|
} > /etc/yum.repos.d/intel-graphics.repo
|
||||||
|
|
||||||
# Disable proxy for Intel URLs
|
|
||||||
RUN echo "no_proxy=.jf.intel.com" >> /etc/yum.conf
|
|
20
templates/centos/25-graphics-user.in
Normal file
20
templates/centos/25-graphics-user.in
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
# 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 dnf install -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
|
||||||
|
|
||||||
|
USER user
|
2
templates/centos/30-clean-up.in
Normal file
2
templates/centos/30-clean-up.in
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Clean dnf cache
|
||||||
|
RUN dnf clean all
|
@ -16,6 +16,6 @@ RUN { \
|
|||||||
echo "PACKAGE_STREAM=${PACKAGE_STREAM}" ; \
|
echo "PACKAGE_STREAM=${PACKAGE_STREAM}" ; \
|
||||||
echo "OS_DISTRO=${OS_DISTRO}" ; \
|
echo "OS_DISTRO=${OS_DISTRO}" ; \
|
||||||
echo "OS_RELEASE=${OS_RELEASE}" ; \
|
echo "OS_RELEASE=${OS_RELEASE}" ; \
|
||||||
} > /assets/SOLUTION
|
} | sudo tee /assets/SOLUTION
|
||||||
COPY MANIFEST /assets/
|
COPY MANIFEST /assets/
|
||||||
COPY ${DOCKERFILE} /assets/Dockerfile
|
COPY ${DOCKERFILE} /assets/Dockerfile
|
||||||
|
6
templates/rhel/00-from.in
Normal file
6
templates/rhel/00-from.in
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
# Pull internal RHEL image
|
||||||
|
FROM dockerv2-gfx-build.gfx-assets.intel.com/upstream/rhel:8.0.0 AS xe-base-stage
|
||||||
|
|
||||||
|
# Flush cached package lists to prevent stale data
|
||||||
|
RUN dnf clean all
|
||||||
|
|
23
templates/rhel/05-intel-proxy.in
Normal file
23
templates/rhel/05-intel-proxy.in
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# Configure Intel proxy values
|
||||||
|
|
||||||
|
ARG http_proxy="http://proxy-chain.intel.com:911/"
|
||||||
|
ARG https_proxy="http://proxy-chain.intel.com:912/"
|
||||||
|
ARG ftp_proxy="ftp://proxy-chain.intel.com:911/"
|
||||||
|
ARG socks_proxy="socks://proxy-chain.intel.com:1080/"
|
||||||
|
ARG no_proxy="localhost,*.*.intel.com"
|
||||||
|
|
||||||
|
ENV http_proxy="${http_proxy}"
|
||||||
|
ENV https_proxy="${https_proxy}"
|
||||||
|
ENV no_proxy="${no_proxy}"
|
||||||
|
ENV ftp_proxy="${http_proxy}"
|
||||||
|
ENV socks_proxy="${socks_proxy}"
|
||||||
|
|
||||||
|
ENV HTTP_PROXY="${http_proxy}"
|
||||||
|
ENV HTTPS_PROXY="${http_proxy}"
|
||||||
|
ENV NO_PROXY="${no_proxy}"
|
||||||
|
|
||||||
|
# Configure DNF and YUM proxies
|
||||||
|
RUN { \
|
||||||
|
echo "proxy=${http_proxy}" ; \
|
||||||
|
echo "no_proxy=${no_proxy}" ; \
|
||||||
|
} | tee -a /etc/dnf/dnf.conf /etc/yum.conf
|
@ -1,12 +1,3 @@
|
|||||||
FROM dockerv2-gfx-build.gfx-assets.intel.com/upstream/rhel:8.0.0 AS user-stage
|
|
||||||
|
|
||||||
# Configure DNF and YUM proxies
|
|
||||||
RUN echo "proxy=http://proxy-chain.intel.com:911" >> /etc/dnf/dnf.conf \
|
|
||||||
&& echo -e 'proxy=http://proxy-chain.intel.com:911\nno_proxy=.intel.com' >> /etc/yum.conf
|
|
||||||
|
|
||||||
# Remove any pre-configured repositories
|
|
||||||
RUN rm -rf /etc/yum.repos.d/*
|
|
||||||
|
|
||||||
# Install the Red Hat partner repositories
|
# Install the Red Hat partner repositories
|
||||||
RUN { \
|
RUN { \
|
||||||
echo "[RHEL-8-appstream-partners]" ; \
|
echo "[RHEL-8-appstream-partners]" ; \
|
||||||
@ -164,36 +155,3 @@ RUN { \
|
|||||||
echo "skip_if_unavailable=1" ; \
|
echo "skip_if_unavailable=1" ; \
|
||||||
echo "" ; \
|
echo "" ; \
|
||||||
} > /etc/yum.repos.d/RHEL-8-rt-intel-partner.repo
|
} > /etc/yum.repos.d/RHEL-8-rt-intel-partner.repo
|
||||||
|
|
||||||
# Update package lists, and upgrade to the latest Red Hat packages
|
|
||||||
RUN dnf clean all \
|
|
||||||
&& dnf -y upgrade \
|
|
||||||
&& dnf clean all
|
|
||||||
|
|
||||||
# repositories.intel.com specific content begins here
|
|
||||||
#
|
|
||||||
# Intel certificates which would allow internal signed certs to be
|
|
||||||
# used are not being installed, so turn sslverify=0 on the
|
|
||||||
# repository.
|
|
||||||
#
|
|
||||||
# To install the certs would be something like:
|
|
||||||
#
|
|
||||||
# A. Copy ca certs to /etc/pki/ca-trust/source/anchors/
|
|
||||||
# B. run update-ca-trust
|
|
||||||
#
|
|
||||||
# Once that is done, the 'sslverify=0' can be removed from
|
|
||||||
# the repository definition below.
|
|
||||||
#
|
|
||||||
# Add Intel Graphics repository
|
|
||||||
#
|
|
||||||
RUN { \
|
|
||||||
echo "[intel-graphics]" ; \
|
|
||||||
echo "name=Intel Graphics Drivers Repository" ; \
|
|
||||||
echo "baseurl=${PACKAGE_REPOSITORY}/${OS_DISTRO}/${PACKAGE_STREAM}/" ; \
|
|
||||||
echo "sslverify=0" ; \
|
|
||||||
echo "enabled=1" ; \
|
|
||||||
echo "gpgcheck=0" ; \
|
|
||||||
} > /etc/yum.repos.d/intel-graphics.repo
|
|
||||||
|
|
||||||
# Disable proxy for Intel URLs
|
|
||||||
RUN echo "no_proxy=.jf.intel.com" >> /etc/yum.conf
|
|
24
templates/rhel/20-repositories-intel-com.in
Normal file
24
templates/rhel/20-repositories-intel-com.in
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
# repositories.intel.com content begins here
|
||||||
|
#
|
||||||
|
# Intel certificates which would allow internal signed certs to be
|
||||||
|
# used are not being installed, so turn sslverify=0 on the
|
||||||
|
# repository.
|
||||||
|
#
|
||||||
|
# To install the certs would be something like:
|
||||||
|
#
|
||||||
|
# A. Copy ca certs to /etc/pki/ca-trust/source/anchors/
|
||||||
|
# B. run update-ca-trust
|
||||||
|
#
|
||||||
|
# Once that is done, the 'sslverify=0' can be removed from
|
||||||
|
# the repository definition below.
|
||||||
|
#
|
||||||
|
# Add Intel Graphics repository
|
||||||
|
#
|
||||||
|
RUN { \
|
||||||
|
echo "[intel-graphics]" ; \
|
||||||
|
echo "name=Intel Graphics Drivers Repository" ; \
|
||||||
|
echo "baseurl=${PACKAGE_REPOSITORY}/${OS_DISTRO}/${PACKAGE_STREAM}/" ; \
|
||||||
|
echo "sslverify=0" ; \
|
||||||
|
echo "enabled=1" ; \
|
||||||
|
echo "gpgcheck=0" ; \
|
||||||
|
} > /etc/yum.repos.d/intel-graphics.repo
|
20
templates/rhel/25-graphics-user.in
Normal file
20
templates/rhel/25-graphics-user.in
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
# 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 dnf install -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
|
||||||
|
|
||||||
|
USER user
|
2
templates/rhel/30-clean-up.in
Normal file
2
templates/rhel/30-clean-up.in
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Clean dnf cache
|
||||||
|
RUN dnf clean all
|
@ -1,3 +1,3 @@
|
|||||||
# Pull from $OS_DISTRO on Docker Hub
|
# Pull from $OS_DISTRO on Docker Hub
|
||||||
FROM $OS_DISTRO:$OS_RELEASE AS graphics-base
|
FROM $OS_DISTRO:$OS_RELEASE AS xe-base-stage
|
||||||
|
|
||||||
|
@ -9,11 +9,27 @@ RUN { \
|
|||||||
done \
|
done \
|
||||||
} > /etc/apt/sources.list
|
} > /etc/apt/sources.list
|
||||||
|
|
||||||
|
ARG http_proxy="http://proxy-chain.intel.com:911/"
|
||||||
|
ARG https_proxy="http://proxy-chain.intel.com:912/"
|
||||||
|
ARG ftp_proxy="ftp://proxy-chain.intel.com:911/"
|
||||||
|
ARG socks_proxy="socks://proxy-chain.intel.com:1080/"
|
||||||
|
ARG no_proxy="localhost,*.*.intel.com"
|
||||||
|
|
||||||
|
ENV http_proxy="${http_proxy}"
|
||||||
|
ENV https_proxy="${https_proxy}"
|
||||||
|
ENV no_proxy="${no_proxy}"
|
||||||
|
ENV ftp_proxy="${http_proxy}"
|
||||||
|
ENV socks_proxy="${socks_proxy}"
|
||||||
|
|
||||||
|
ENV HTTP_PROXY="${http_proxy}"
|
||||||
|
ENV HTTPS_PROXY="${http_proxy}"
|
||||||
|
ENV NO_PROXY="${no_proxy}"
|
||||||
|
|
||||||
RUN { \
|
RUN { \
|
||||||
echo "Acquire::http::proxy \"http://proxy-chain.intel.com:911/\";\n" ; \
|
echo "Acquire::http::proxy \"${http_proxy}\";\n" ; \
|
||||||
echo "Acquire::https::proxy \"http://proxy-chain.intel.com:912/\";\n" ; \
|
echo "Acquire::https::proxy \"${https_proxy}\";\n" ; \
|
||||||
echo "Acquire::ftp::proxy \"ftp://proxy-chain.intel.com:911/\";\n" ; \
|
echo "Acquire::ftp::proxy \"${ftp_proxy}\";\n" ; \
|
||||||
echo "Acquire::socks::proxy \"socks://proxy-chain.intel.com:1080/\";\n" ; \
|
echo "Acquire::socks::proxy \"${socks_proxy}\";\n" ; \
|
||||||
echo "Acquire::http::Proxy::linux-ftp.ostc.intel.com DIRECT;\n" ; \
|
echo "Acquire::http::Proxy::linux-ftp.ostc.intel.com DIRECT;\n" ; \
|
||||||
echo "Acquire::http::Proxy::osgc.jf.intel.com DIRECT;\n" ; \
|
|
||||||
} > /etc/apt/apt.conf
|
} > /etc/apt/apt.conf
|
||||||
|
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
# Pre-install proxy configuration values
|
|
||||||
#
|
|
||||||
# This uses the linux-ftp.ostc.intel.com as a mirror.
|
|
||||||
RUN echo "Acquire::http::proxy \"http://proxy-chain.intel.com:911/\";\n" \
|
|
||||||
"Acquire::https::proxy \"http://proxy-chain.intel.com:912/\";\n" \
|
|
||||||
"Acquire::ftp::proxy \"ftp://proxy-chain.intel.com:911/\";\n" \
|
|
||||||
"Acquire::socks::proxy \"socks://proxy-chain.intel.com:1080/\";\n" \
|
|
||||||
"Acquire::http::Proxy::linux-ftp.ostc.intel.com DIRECT;\n" \
|
|
||||||
"Acquire::http::Proxy::osgc.jf.intel.com DIRECT;\n" > /etc/apt/apt.conf
|
|
@ -1,5 +1,3 @@
|
|||||||
FROM base AS graphics-base
|
|
||||||
|
|
||||||
# Once we have a signed repository:
|
# Once we have a signed repository:
|
||||||
#
|
#
|
||||||
# Update and install gpg-agent as it isn't in the base Ubuntu image and
|
# Update and install gpg-agent as it isn't in the base Ubuntu image and
|
||||||
|
@ -1,23 +1,26 @@
|
|||||||
# Create user 'graphics' and add them to 'sudo' for sudo access and set
|
# Create user 'user' and add them to 'sudo' for sudo access and set
|
||||||
# the passwd to 'graphics'
|
# the passwd to 'user'
|
||||||
|
|
||||||
FROM graphics-base AS user-stage
|
FROM xe-base-stage AS xe-user-stage
|
||||||
|
|
||||||
RUN apt-get -q update \
|
RUN apt-get -q update \
|
||||||
&& DEBIAN_FRONTEND=noninteractive \
|
&& DEBIAN_FRONTEND=noninteractive \
|
||||||
apt-get install --no-install-recommends -y \
|
&& apt-get install --no-install-recommends -y \
|
||||||
sudo \
|
sudo
|
||||||
&& apt-get clean \
|
|
||||||
&& rm -rf /var/lib/apt/lists/{apt,dpkg,cache,log}
|
|
||||||
|
|
||||||
# NOTE: Requires 'sudo' package to already be installed
|
# NOTE: Requires 'sudo' package to already be installed
|
||||||
RUN groupadd -r graphics \
|
RUN groupadd -r user \
|
||||||
&& useradd --no-log-init \
|
&& useradd --no-log-init \
|
||||||
-s /bin/bash \
|
-s /bin/bash \
|
||||||
-r -m \
|
-r -m \
|
||||||
-g graphics \
|
-g user \
|
||||||
-G sudo \
|
-G sudo \
|
||||||
-p $(echo "graphics" | openssl passwd -stdin) graphics
|
-p $(echo "user" | openssl passwd -stdin) user
|
||||||
|
|
||||||
# Set 'sudo' to NOPASSWD for all container users
|
# Set 'sudo' to NOPASSWD for all container users
|
||||||
RUN sed -i -e 's,%sudo.*,%sudo ALL=(ALL) NOPASSWD:ALL,g' /etc/sudoers
|
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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user