Skip to content

Commit 8888a88

Browse files
committed
Multi-arch, other tidies
1 parent f81843d commit 8888a88

File tree

9 files changed

+58
-28
lines changed

9 files changed

+58
-28
lines changed

base/ampbase/Dockerfile

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,49 @@
1-
FROM debian:bookworm-slim
1+
FROM --platform=$TARGETPLATFORM debian:bookworm-slim
22

33
LABEL org.opencontainers.image.source="https://github.com/CubeCoders/dockerfiles"
44
LABEL org.opencontainers.image.licenses=MIT
55

6-
ENV DEBIAN_FRONTEND=noninteractive
76
ENV AMP_CONTAINER="DOCKER"
87
ENV LD_LIBRARY_PATH="./:/opt/cubecoders/amp/:/AMP/"
98

9+
ARG DEBIAN_FRONTEND=noninteractive
10+
ARG TARGETARCH
11+
1012
# Update base packages and install dependencies
1113
RUN mkdir -p /usr/share/man/man1 &&\
12-
dpkg --add-architecture i386 &&\
1314
apt-get update &&\
1415
apt-get install -y --no-install-recommends ca-certificates software-properties-common curl wget tar unzip xz-utils bzip2\
1516
coreutils procps net-tools iproute2 inetutils-ping socat jq git git-lfs gnupg lsof tmux sqlite3 gdb\
1617
tini tzdata locales\
1718
xvfb xauth libxi6\
18-
libc6 libc++1 libc++abi1 libcurl4 libatomic1 libpulse-dev liblua5.3-0 libfontconfig1 libgdiplus libsqlite3-0 libzstd1 libsdl2-2.0-0 libsdl1.2debian libssl-dev\
19-
libc6:i386 libc++1:i386 libc++abi1:i386 libstdc++6:i386 libgcc-s1:i386 zlib1g:i386 libbz2-1.0:i386 libcurl4:i386 libtinfo6:i386 libncurses6:i386 libncurses5:i386 libtinfo5:i386 libsdl2-2.0-0:i386 libsdl1.2-compat:i386 libssl-dev:i386 &&\
19+
libc6 libc++1 libc++abi1 libcurl4 libatomic1 libpulse-dev liblua5.3-0 libfontconfig1 libgdiplus libsqlite3-0 libzstd1 libsdl2-2.0-0 libsdl1.2debian libssl-dev &&\
20+
if [ "$TARGETARCH" = "amd64" ]; then\
21+
dpkg --add-architecture i386 &&\
22+
apt-get update &&\
23+
apt-get install -y --no-install-recommends libc6:i386 libc++1:i386 libc++abi1:i386 libstdc++6:i386 libgcc-s1:i386 zlib1g:i386 libbz2-1.0:i386 libcurl4:i386 libtinfo6:i386\
24+
libncurses6:i386 libncurses5:i386 libtinfo5:i386 libsdl2-2.0-0:i386 libsdl1.2-compat:i386 libssl-dev:i386;\
25+
fi &&\
2026
apt-get clean &&\
2127
rm -rf /var/lib/apt/lists/* &&\
22-
wget -q https://cdn-repo.c7rs.com/ampinstmgr-latest.tgz &&\
23-
tar -xf ampinstmgr-latest.tgz -C / &&\
28+
case "$TARGETARCH" in\
29+
amd64) wget -q https://cdn-repo.c7rs.com/ampinstmgr-latest.tgz ;;\
30+
arm64) wget -q https://cdn-repo.c7rs.com/aarch64/ampinstmgr-latest.tgz ;;\
31+
esac &&\
32+
tar -xzf ampinstmgr-latest.tgz -C / &&\
2433
rm ampinstmgr-latest.tgz
2534

2635
# Temp fix if libssl1.1 needed
27-
RUN wget -q http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb &&\
28-
dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb &&\
29-
rm libssl1.1_1.1.0g-2ubuntu4_amd64.deb
36+
RUN case "$TARGETARCH" in\
37+
amd64) wget -qO libssl1.1.deb https://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb ;;\
38+
arm64) wget -qO libssl1.1.deb https://ports.ubuntu.com/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_arm64.deb ;;\
39+
esac &&\
40+
apt-get update &&\
41+
apt-get install -y --no-install-recommends ./libssl1.1.deb &&\
42+
rm libssl1.1.deb &&\
43+
apt-get clean &&\
44+
rm -rf /var/lib/apt/lists/*
3045

31-
# Configure locale
46+
# Configure locale
3247
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen &&\
3348
locale-gen
3449

java/Dockerfile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
# Java image including all Temurin LTS versions
22

3-
FROM cubecoders/ampbase:latest
3+
FROM --platform=$TARGETPLATFORM cubecoders/ampbase:latest
44

55
LABEL org.opencontainers.image.licenses=MIT
66

7+
ARG DEBIAN_FRONTEND=noninteractive
8+
79
# Install required packages and Temurin Java LTS versions
810
RUN apt-get update &&\
9-
apt-get install -y --no-install-recommends fontconfig libfreetype6 fonts-dejavu-core &&\
10-
mkdir -pm755 /etc/apt/keyrings &&\
11+
apt-get install -y --no-install-recommends fontconfig fonts-dejavu-core &&\
12+
install -d -m 0755 /etc/apt/keyrings &&\
1113
wget -qO - https://packages.adoptium.net/artifactory/api/gpg/key/public | gpg --dearmor | tee /etc/apt/trusted.gpg.d/adoptium.gpg > /dev/null &&\
1214
echo "deb https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | tee /etc/apt/sources.list.d/adoptium.list &&\
1315
apt-get update &&\
14-
apt-get install -y temurin-8-jdk temurin-11-jdk temurin-17-jdk temurin-18-jdk temurin-21-jdk &&\
16+
apt-get install -y temurin-8-jdk temurin-11-jdk temurin-17-jdk temurin-21-jdk &&\
1517
apt-get clean &&\
1618
rm -rf /var/lib/apt/lists/*

mono/Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
# Mono image
22

3-
FROM ghcr.io/cubecoders/ampbase:latest
3+
FROM --platform=$TARGETPLATFORM ghcr.io/cubecoders/ampbase:latest
44

55
LABEL org.opencontainers.image.licenses=MIT
66

7+
ARG DEBIAN_FRONTEND=noninteractive
8+
79
# Install required packages and Mono
810
RUN apt-get update &&\
911
apt-get install -y --no-install-recommends dirmngr &&\
10-
mkdir -pm755 /etc/apt/keyrings &&\
12+
install -d -m 0755 /etc/apt/keyrings &&\
1113
gpg --homedir /tmp --no-default-keyring --keyring /etc/apt/keyrings/mono-official-archive-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF &&\
1214
echo "deb [signed-by=/etc/apt/keyrings/mono-official-archive-keyring.gpg] https://download.mono-project.com/repo/debian stable-buster main" | tee /etc/apt/sources.list.d/mono-official-stable.list &&\
1315
apt-get update &&\
14-
apt-get install -y --install-recommends mono-complete &&\
16+
apt-get install -y mono-complete &&\
1517
apt-get clean &&\
1618
rm -rf /var/lib/apt/lists/*

python/Dockerfile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
# Python image for Python 3.10, 3.11 and 3.12
22

3-
FROM python:3.10-slim-bookworm AS py310
4-
FROM python:3.12-slim-bookworm AS py312
3+
FROM --platform=$TARGETPLATFORM python:3.10-slim-bookworm AS py310
4+
FROM --platform=$TARGETPLATFORM python:3.12-slim-bookworm AS py312
55

6-
FROM ghcr.io/cubecoders/ampbase:latest
6+
FROM --platform=$TARGETPLATFORM ghcr.io/cubecoders/ampbase:latest
77
LABEL org.opencontainers.image.licenses=MIT
88

9-
ENV DEBIAN_FRONTEND=noninteractive
109
ENV PIP_DISABLE_PIP_VERSION_CHECK=1
1110

11+
ARG DEBIAN_FRONTEND=noninteractive
12+
1213
# System Python (3.11) from Debian
1314
RUN apt-get update &&\
14-
apt-get install -y python3 python3-pip python3-venv &&\
15+
apt-get install -y --no-install-recommends python3 python3-pip python3-venv &&\
1516
apt-get clean &&\
1617
rm -rf /var/lib/apt/lists/*
1718

wine/10/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ FROM ghcr.io/cubecoders/ampbase:latest
44

55
LABEL org.opencontainers.image.licenses=MIT
66

7+
ARG DEBIAN_FRONTEND=noninteractive
8+
79
# Install required packages and Wine 10 stable
810
RUN apt-get update &&\
911
apt-get install -y --no-install-recommends cabextract winbind wine-binfmt python3 &&\
10-
mkdir -pm755 /etc/apt/keyrings &&\
12+
install -d -m 0755 /etc/apt/keyrings &&\
1113
wget -O - https://dl.winehq.org/wine-builds/winehq.key | gpg --dearmor -o /etc/apt/keyrings/winehq-archive.key - &&\
1214
wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/bookworm/winehq-bookworm.sources &&\
1315
apt-get update &&\

wine/9/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ FROM ghcr.io/cubecoders/ampbase:latest
44

55
LABEL org.opencontainers.image.licenses=MIT
66

7+
ARG DEBIAN_FRONTEND=noninteractive
8+
79
# Install required packages and Wine 9 stable
810
RUN apt-get update &&\
911
apt-get install -y --no-install-recommends cabextract winbind wine-binfmt python3 &&\
10-
mkdir -pm755 /etc/apt/keyrings &&\
12+
install -d -m 0755 /etc/apt/keyrings &&\
1113
wget -O - https://dl.winehq.org/wine-builds/winehq.key | gpg --dearmor -o /etc/apt/keyrings/winehq-archive.key - &&\
1214
wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/bookworm/winehq-bookworm.sources &&\
1315
apt-get update &&\

wine/devel/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ FROM ghcr.io/cubecoders/ampbase:latest
44

55
LABEL org.opencontainers.image.licenses=MIT
66

7+
ARG DEBIAN_FRONTEND=noninteractive
8+
79
# Install required packages and Wine devel
810
RUN apt-get update &&\
911
apt-get install -y --no-install-recommends cabextract winbind wine-binfmt python3 &&\
10-
mkdir -pm755 /etc/apt/keyrings &&\
12+
install -d -m 0755 /etc/apt/keyrings &&\
1113
wget -O - https://dl.winehq.org/wine-builds/winehq.key | gpg --dearmor -o /etc/apt/keyrings/winehq-archive.key - &&\
1214
wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/bookworm/winehq-bookworm.sources &&\
1315
apt-get update &&\

wine/stable/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ FROM ghcr.io/cubecoders/ampbase:latest
44

55
LABEL org.opencontainers.image.licenses=MIT
66

7+
ARG DEBIAN_FRONTEND=noninteractive
8+
79
# Install required packages and Wine stable
810
RUN apt-get update &&\
911
apt-get install -y --no-install-recommends cabextract winbind wine-binfmt python3 &&\
10-
mkdir -pm755 /etc/apt/keyrings &&\
12+
install -d -m 0755 /etc/apt/keyrings &&\
1113
wget -O - https://dl.winehq.org/wine-builds/winehq.key | gpg --dearmor -o /etc/apt/keyrings/winehq-archive.key - &&\
1214
wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/bookworm/winehq-bookworm.sources &&\
1315
apt-get update &&\

wine/staging/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ FROM ghcr.io/cubecoders/ampbase:latest
44

55
LABEL org.opencontainers.image.licenses=MIT
66

7+
ARG DEBIAN_FRONTEND=noninteractive
8+
79
# Install required packages and Wine staging
810
RUN apt-get update &&\
911
apt-get install -y --no-install-recommends cabextract winbind wine-binfmt python3 &&\
10-
mkdir -pm755 /etc/apt/keyrings &&\
12+
install -d -m 0755 /etc/apt/keyrings &&\
1113
wget -O - https://dl.winehq.org/wine-builds/winehq.key | gpg --dearmor -o /etc/apt/keyrings/winehq-archive.key - &&\
1214
wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/bookworm/winehq-bookworm.sources &&\
1315
apt-get update &&\

0 commit comments

Comments
 (0)