Skip to content

Commit

Permalink
Use base images
Browse files Browse the repository at this point in the history
  • Loading branch information
mattleibow committed Jul 10, 2024
1 parent 6bab23e commit ef30760
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 24 deletions.
11 changes: 7 additions & 4 deletions scripts/Docker/alpine/amd64/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Arguments:
# DOTNET_SDK_VERSION - the version of dotnet for the Cake script [ 8.0 | * ]

FROM mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.17
FROM amd64/alpine:3.17

# Install the skia build dependencies
RUN apk add --no-cache fontconfig-dev gn ninja
# Install the required packages
RUN apk add --no-cache \
gn ninja clang python3 bash git build-base linux-headers \
fontconfig-dev

# Install the .NET SDK
ARG DOTNET_SDK_VERSION=8.0
Expand All @@ -13,7 +15,8 @@ RUN wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh \
&& bash dotnet-install.sh --channel ${DOTNET_SDK_VERSION} --install-dir /usr/share/dotnet --verbose \
&& ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \
&& rm dotnet-install.sh \
&& dotnet help
&& dotnet help \
&& dotnet --info

ENV CC=clang CXX=clang++ GN_EXE=/usr/bin/gn

Expand Down
11 changes: 7 additions & 4 deletions scripts/Docker/alpine/arm64v8/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Arguments:
# DOTNET_SDK_VERSION - the version of dotnet for the Cake script [ 8.0 | * ]

FROM mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.17-arm64v8-local
FROM arm64v8/alpine:3.17

# Install the skia build dependencies
RUN apk add --no-cache fontconfig-dev gn ninja
# Install the required packages
RUN apk add --no-cache \
gn ninja clang python3 bash git build-base linux-headers \
fontconfig-dev

# Install the .NET SDK
ARG DOTNET_SDK_VERSION=8.0
Expand All @@ -13,7 +15,8 @@ RUN wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh \
&& bash dotnet-install.sh --channel ${DOTNET_SDK_VERSION} --install-dir /usr/share/dotnet --verbose \
&& ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \
&& rm dotnet-install.sh \
&& dotnet help
&& dotnet help \
&& dotnet --info

ENV CC=clang CXX=clang++ GN_EXE=/usr/bin/gn

Expand Down
13 changes: 8 additions & 5 deletions scripts/Docker/debian/amd64/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# Arguments:
# DOTNET_SDK_VERSION - the version of dotnet for the Cake script [ 8.0 | * ]

FROM mcr.microsoft.com/dotnet-buildtools/prereqs:debian-11-amd64
FROM amd64/debian:10

# Install the skia build dependencies
# Install the required packages
RUN apt-get update \
&& apt-get install -y libfontconfig1-dev ninja-build \
&& apt-get install -y \
curl python3 git clang-13 ninja-build \
libfontconfig1-dev \
&& rm -rf /var/lib/apt/lists/*

# Install the .NET SDK
Expand All @@ -15,8 +17,9 @@ RUN curl https://dot.net/v1/dotnet-install.sh -L -o dotnet-install.sh \
&& bash dotnet-install.sh --channel ${DOTNET_SDK_VERSION} --install-dir /usr/share/dotnet --verbose \
&& ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \
&& rm dotnet-install.sh \
&& dotnet help
&& dotnet help \
&& dotnet --info

ENV CC=clang CXX=clang++
ENV CC=clang-13 CXX=clang++-13

WORKDIR /work
13 changes: 8 additions & 5 deletions scripts/Docker/debian/arm64v8/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# Arguments:
# DOTNET_SDK_VERSION - the version of dotnet for the Cake script [ 8.0 | * ]

FROM mcr.microsoft.com/dotnet-buildtools/prereqs:debian-11-arm64v8
FROM arm64v8/debian:10

# Install the skia build dependencies
# Install the required packages
RUN apt-get update \
&& apt-get install -y libfontconfig1-dev ninja-build \
&& apt-get install -y \
curl python3 git clang-13 ninja-build \
libfontconfig1-dev \
&& rm -rf /var/lib/apt/lists/*

# Install the .NET SDK
Expand All @@ -15,8 +17,9 @@ RUN curl https://dot.net/v1/dotnet-install.sh -L -o dotnet-install.sh \
&& bash dotnet-install.sh --channel ${DOTNET_SDK_VERSION} --install-dir /usr/share/dotnet --verbose \
&& ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \
&& rm dotnet-install.sh \
&& dotnet help
&& dotnet help \
&& dotnet --info

ENV CC=clang CXX=clang++
ENV CC=clang-13 CXX=clang++-13

WORKDIR /work
14 changes: 8 additions & 6 deletions scripts/Docker/debian/clang-cross/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@
# FONTCONFIG_VERSION - the exact version of libfontconfig1 to use [ 2.13.1-2 | * ]

ARG IMAGE_ARCH=amd64
FROM mcr.microsoft.com/dotnet-buildtools/prereqs:debian-11-${IMAGE_ARCH}
FROM ${IMAGE_ARCH}/debian:10

# Install the skia build dependencies
# Install the required packages
RUN apt-get update \
&& apt-get install -y ninja-build \
&& apt-get install -y \
curl python3 git clang-13 ninja-build \
&& rm -rf /var/lib/apt/lists/*

# Install the cross-compilation GCC toolchain
ARG TOOLCHAIN_VERSION=9
ARG TOOLCHAIN_VERSION=8
ARG TOOLCHAIN_ARCH=arm-linux-gnueabihf
ARG TOOLCHAIN_ARCH_SHORT=armhf
RUN apt-get update \
Expand Down Expand Up @@ -55,8 +56,9 @@ RUN curl https://dot.net/v1/dotnet-install.sh -L -o dotnet-install.sh \
&& bash dotnet-install.sh --channel ${DOTNET_SDK_VERSION} --install-dir /usr/share/dotnet --verbose \
&& ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \
&& rm dotnet-install.sh \
&& dotnet help
&& dotnet help \
&& dotnet --info

ENV CC=clang CXX=clang++
ENV CC=clang-13 CXX=clang++-13

WORKDIR /work

0 comments on commit ef30760

Please sign in to comment.