Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions Fedora-40/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
FROM registry.fedoraproject.org/fedora:40 AS build

# Preinstall python + dependencies as virtual environment
RUN dnf \
RUN --mount=type=cache,target=/var/cache/dnf,sharing=locked \
dnf \
--assumeyes \
--nodocs \
--setopt=install_weak_deps=0 \
Expand All @@ -29,15 +30,17 @@ RUN dnf \
RUN virtualenv /opt/venv
ENV VIRTUAL_ENV /opt/venv
ENV PATH /opt/venv/bin:$PATH
RUN pip install --upgrade pip \
RUN --mount=type=cache,target=/root/.cache/pip \
pip install --upgrade pip \
-r "https://raw.githubusercontent.com/tianocore/edk2/master/pip-requirements.txt"


ARG CSPELL_VERSION=8.0.0
ARG MARKDOWNLINT_VERSION=0.37.0
ARG POWERSHELL_VERSION=7.4.1
ARG DOTNET_VERSION=8.0
RUN dnf \
RUN --mount=type=cache,target=/var/cache/dnf,sharing=locked \
dnf \
--assumeyes \
--nodocs \
--setopt=install_weak_deps=0 \
Expand Down Expand Up @@ -71,7 +74,8 @@ RUN dnf \
tar \
sudo
RUN alternatives --install /usr/bin/python python /usr/bin/python3 1
RUN pip install --upgrade pip lcov_cobertura setuptools
RUN --mount=type=cache,target=/root/.cache/pip \
pip install --upgrade pip lcov_cobertura setuptools

# Set toolchains prefix
ENV GCC_AARCH64_PREFIX /usr/bin/aarch64-linux-gnu-
Expand All @@ -85,7 +89,8 @@ ENV GCC5_RISCV64_PREFIX /usr/bin/riscv64-linux-gnu-
ENV GCC5_LOONGARCH64_PREFIX /usr/bin/loongarch64-linux-gnu-

# Tools used by build extensions.
RUN npm install -g npm \
RUN --mount=type=cache,target=/root/.npm \
npm install -g npm \
cspell@${CSPELL_VERSION} \
markdownlint-cli@${MARKDOWNLINT_VERSION}

Expand All @@ -95,7 +100,8 @@ RUN npm install -g npm \
# architectures under test.

FROM build AS test
RUN dnf \
RUN --mount=type=cache,target=/var/cache/dnf,sharing=locked \
dnf \
--assumeyes \
--nodocs \
--setopt=install_weak_deps=0 \
Expand All @@ -112,7 +118,8 @@ RUN dnf \
# tools for local developers.
FROM test AS dev
ENV GCM_LINK=https://github.com/GitCredentialManager/git-credential-manager/releases/download/v2.0.785/gcm-linux_amd64.2.0.785.tar.gz
RUN dnf \
RUN --mount=type=cache,target=/var/cache/dnf,sharing=locked \
dnf \
--assumeyes \
--nodocs \
--setopt=install_weak_deps=0 \
Expand Down
29 changes: 17 additions & 12 deletions Ubuntu-22/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,24 @@ ENV TZ=UTC
ENV GCC_MAJOR_VERSION=12

# Preinstall python + dependencies as virtual environment
RUN apt-get update && \
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update && \
apt-get install --yes --no-install-recommends \
python3 \
virtualenv
RUN virtualenv /opt/venv
ENV VIRTUAL_ENV /opt/venv
ENV PATH /opt/venv/bin:$PATH
RUN pip install --upgrade pip \
RUN --mount=type=cache,target=/root/.cache/pip \
pip install --upgrade pip \
-r "https://raw.githubusercontent.com/tianocore/edk2/master/pip-requirements.txt"


# Install and update the package list
RUN apt-get update && \
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update && \
apt-get install --yes --no-install-recommends \
software-properties-common \
apt-utils \
Expand All @@ -66,9 +71,7 @@ RUN apt-get update && \
g++-${GCC_MAJOR_VERSION}-riscv64-linux-gnu gcc-${GCC_MAJOR_VERSION}-riscv64-linux-gnu \
g++-${GCC_MAJOR_VERSION}-arm-linux-gnueabi gcc-${GCC_MAJOR_VERSION}-arm-linux-gnueabi \
g++-${GCC_MAJOR_VERSION}-arm-linux-gnueabihf gcc-${GCC_MAJOR_VERSION}-arm-linux-gnueabihf && \
apt-get upgrade -y && \
apt-get clean &&\
rm -rf /var/lib/apt/lists/*
apt-get upgrade -y

RUN \
update-alternatives \
Expand Down Expand Up @@ -147,7 +150,9 @@ COPY init_edkrepo_conf.sh /usr/bin/init_edkrepo_conf
#Building qemu from source:
FROM build AS test
ARG QEMU_URL="https://download.qemu.org/qemu-7.1.0.tar.xz"
RUN apt-get update && apt-get install --yes --no-install-recommends \
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update && apt-get install --yes --no-install-recommends \
autoconf \
automake \
autotools-dev \
Expand All @@ -166,7 +171,7 @@ RUN apt-get update && apt-get install --yes --no-install-recommends \
make install -j $(nproc) && \
cd .. && \
rm -rf qemu-build && \
apt remove --yes \
apt remove --yes --purge \
ninja-build

#####################################################################
Expand All @@ -176,17 +181,17 @@ FROM test AS dev

# Install convenience tools. Things we like having around, but aren't
# required.
RUN apt-get update && \
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update && \
apt-get install --yes --no-install-recommends \
bear \
clang \
less \
lld \
llvm \
nano \
vim \
&& \
apt-get clean
vim

# Setup the entry point
COPY ubuntu22_dev_entrypoint.sh /usr/libexec/entrypoint
Expand Down
29 changes: 17 additions & 12 deletions Ubuntu-24/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,24 @@ ENV TZ=UTC
ENV GCC_MAJOR_VERSION=13

# Preinstall python + dependencies as virtual environment
RUN apt-get update && \
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update && \
apt-get install --yes --no-install-recommends \
python3 python3-venv\
virtualenv
RUN virtualenv /opt/venv
ENV VIRTUAL_ENV /opt/venv
ENV PATH /opt/venv/bin:$PATH
RUN pip install --upgrade pip \
RUN --mount=type=cache,target=/root/.cache/pip \
pip install --upgrade pip \
-r "https://raw.githubusercontent.com/tianocore/edk2/master/pip-requirements.txt"


# Install and update the package list
RUN apt-get update && \
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update && \
apt-get install --yes --no-install-recommends \
software-properties-common \
apt-utils \
Expand All @@ -69,9 +74,7 @@ RUN apt-get update && \
g++-${GCC_MAJOR_VERSION}-riscv64-linux-gnu gcc-${GCC_MAJOR_VERSION}-riscv64-linux-gnu \
g++-${GCC_MAJOR_VERSION}-arm-linux-gnueabi gcc-${GCC_MAJOR_VERSION}-arm-linux-gnueabi \
g++-${GCC_MAJOR_VERSION}-arm-linux-gnueabihf gcc-${GCC_MAJOR_VERSION}-arm-linux-gnueabihf && \
apt-get upgrade -y && \
apt-get clean &&\
rm -rf /var/lib/apt/lists/*
apt-get upgrade -y

RUN \
update-alternatives \
Expand Down Expand Up @@ -151,7 +154,9 @@ COPY init_edkrepo_conf.sh /usr/bin/init_edkrepo_conf
#Building qemu from source:
FROM build AS test
ARG QEMU_URL="https://download.qemu.org/qemu-9.1.1.tar.xz"
RUN apt-get update && apt-get install --yes --no-install-recommends \
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update && apt-get install --yes --no-install-recommends \
autoconf \
automake \
autotools-dev \
Expand All @@ -170,7 +175,7 @@ RUN apt-get update && apt-get install --yes --no-install-recommends \
make install -j $(nproc) && \
cd .. && \
rm -rf qemu-build && \
apt remove --yes \
apt remove --yes --purge \
ninja-build

#####################################################################
Expand All @@ -180,7 +185,9 @@ FROM test AS dev

# Install convenience tools. Things we like having around, but aren't
# required.
RUN apt-get update && \
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update && \
apt-get install --yes --no-install-recommends \
bear \
clang \
Expand All @@ -189,9 +196,7 @@ RUN apt-get update && \
llvm \
nano \
vim \
cmake \
&& \
apt-get clean
cmake

# Setup the entry point
COPY ubuntu24_dev_entrypoint.sh /usr/libexec/entrypoint
Expand Down