# Update and install curl and dpkg-dev as they isn't in the base Ubuntu # image and is needed for creating a local filesystem repo # # Adapted from https://agama.jf.intel.com/drivers/dg1/ubuntu/local # Prerequisites # RUN apt-get -q update \ && DEBIAN_FRONTEND=noninteractive \ apt-get --no-install-recommends -q -y install \ dpkg-dev \ curl # Make /repos/${BUILD} directory # WORKDIR /repos/${BUILD} # Download ${BUILD} artifacts # # ARTIFACTORY_PATH is set by scripts/build-dockerfile.sh based on the value of # BUILD. For example, agama-ci-releases_20.4 becomes agama-ci-releases/20.4 # # sh (the shell interpreter of Docker) does not support subsitution so # this can't be done within the Dockerfile itself. # # Since we're already making special variables, scripts/build-dockerfile.sh # will also set ARTIFACTORY_RELEASE based on the OS_RELEASE name if Ubuntu # is being used (eg., 20.04 for focal, etc) # RUN curl -s --noproxy '*' -L \ https://gfx-assets-build.fm.intel.com/artifactory/api/archive/download/agama-builds/ci/${ARTIFACTORY_PATH}/${BUILD}/artifacts/linux/${OS_DISTRO}/${ARTIFACTORY_RELEASE}?archiveType=tgz \ | tar -xvz --warning=no-timestamp # Turn /repos/${BUILD} into a local package repository # RUN dpkg-scanpackages . > Packages # Add the local package repository to the system RUN echo "deb [trusted=yes arch=amd64] file:///repos/${BUILD} ./" \ | tee /etc/apt/sources.list.d/intel-graphics-${BUILD}.list RUN apt-get -y update # Cleanup RUN apt-get remove -y curl dpkg-dev \ && apt-get clean \ && rm -rf /var/lib/apt/lists/{apt,dpkg,cache,log}