Skip to content

Commit a0d094c

Browse files
committed
Readability
1 parent 8888a88 commit a0d094c

File tree

9 files changed

+158
-152
lines changed

9 files changed

+158
-152
lines changed

base/ampbase/Dockerfile

Lines changed: 50 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,61 @@
1-
FROM --platform=$TARGETPLATFORM debian:bookworm-slim
1+
# Base image for AMP containers
22

3-
LABEL org.opencontainers.image.source="https://github.com/CubeCoders/dockerfiles"
4-
LABEL org.opencontainers.image.licenses=MIT
3+
FROM --platform=$TARGETPLATFORM debian:bookworm-slim
54

6-
ENV AMP_CONTAINER="DOCKER"
7-
ENV LD_LIBRARY_PATH="./:/opt/cubecoders/amp/:/AMP/"
5+
LABEL org.opencontainers.image.source="https://github.com/CubeCoders/dockerfiles"
6+
LABEL org.opencontainers.image.licenses=MIT
87

9-
ARG DEBIAN_FRONTEND=noninteractive
10-
ARG TARGETARCH
8+
ENV AMP_CONTAINER="DOCKER"
9+
ENV LD_LIBRARY_PATH="./:/opt/cubecoders/amp/:/AMP/"
10+
11+
ARG DEBIAN_FRONTEND=noninteractive
12+
ARG TARGETARCH
1113

1214
# Update base packages and install dependencies
13-
RUN mkdir -p /usr/share/man/man1 &&\
14-
apt-get update &&\
15-
apt-get install -y --no-install-recommends ca-certificates software-properties-common curl wget tar unzip xz-utils bzip2\
16-
coreutils procps net-tools iproute2 inetutils-ping socat jq git git-lfs gnupg lsof tmux sqlite3 gdb\
17-
tini tzdata locales\
18-
xvfb xauth libxi6\
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 &&\
26-
apt-get clean &&\
27-
rm -rf /var/lib/apt/lists/* &&\
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 / &&\
33-
rm ampinstmgr-latest.tgz
15+
RUN mkdir -p /usr/share/man/man1 && \
16+
apt-get update && \
17+
apt-get install -y --no-install-recommends \
18+
ca-certificates software-properties-common curl wget tar unzip xz-utils bzip2 \
19+
coreutils procps net-tools iproute2 inetutils-ping socat jq git git-lfs gnupg lsof tmux sqlite3 gdb \
20+
tini tzdata locales \
21+
xvfb xauth libxi6 \
22+
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 && \
23+
if [ "$TARGETARCH" = "amd64" ]; then \
24+
dpkg --add-architecture i386 && \
25+
apt-get update && \
26+
apt-get install -y --no-install-recommends \
27+
libc6:i386 libc++1:i386 libc++abi1:i386 libstdc++6:i386 libgcc-s1:i386 zlib1g:i386 libbz2-1.0:i386 libcurl4:i386 libtinfo6:i386 \
28+
libncurses6:i386 libncurses5:i386 libtinfo5:i386 libsdl2-2.0-0:i386 libsdl1.2-compat:i386 libssl-dev:i386; \
29+
fi && \
30+
apt-get clean && \
31+
rm -rf /var/lib/apt/lists/* && \
32+
case "$TARGETARCH" in \
33+
amd64) wget -q https://cdn-repo.c7rs.com/ampinstmgr-latest.tgz ;; \
34+
arm64) wget -q https://cdn-repo.c7rs.com/aarch64/ampinstmgr-latest.tgz ;; \
35+
esac && \
36+
tar -xzf ampinstmgr-latest.tgz -C / && \
37+
rm ampinstmgr-latest.tgz
3438

3539
# Temp fix if libssl1.1 needed
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/*
40+
RUN case "$TARGETARCH" in \
41+
amd64) wget -qO libssl1.1.deb https://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb ;; \
42+
arm64) wget -qO libssl1.1.deb https://ports.ubuntu.com/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_arm64.deb ;; \
43+
esac & &\
44+
apt-get update && \
45+
apt-get install -y --no-install-recommends ./libssl1.1.deb && \
46+
rm libssl1.1.deb && \
47+
apt-get clean && \
48+
rm -rf /var/lib/apt/lists/*
4549

4650
# Configure locale
47-
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen &&\
48-
locale-gen
51+
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
52+
locale-gen
4953

50-
ENV LANG=en_US.UTF-8
51-
ENV LANGUAGE=en_US:en
52-
ENV LC_ALL=en_US.UTF-8
54+
ENV LANG=en_US.UTF-8
55+
ENV LANGUAGE=en_US:en
56+
ENV LC_ALL=en_US.UTF-8
5357

54-
COPY ./scripts/ampstart.sh /ampstart.sh
55-
RUN chmod +x /ampstart.sh
56-
ENTRYPOINT ["/usr/bin/tini", "-g", "--"]
57-
CMD ["/ampstart.sh"]
58+
COPY ./scripts/ampstart.sh /ampstart.sh
59+
RUN chmod +x /ampstart.sh
60+
ENTRYPOINT ["/usr/bin/tini", "-g", "--"]
61+
CMD ["/ampstart.sh"]

java/Dockerfile

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

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

5-
LABEL org.opencontainers.image.licenses=MIT
5+
LABEL org.opencontainers.image.licenses=MIT
66

7-
ARG DEBIAN_FRONTEND=noninteractive
7+
ARG DEBIAN_FRONTEND=noninteractive
88

99
# Install required packages and Temurin Java LTS versions
10-
RUN apt-get update &&\
11-
apt-get install -y --no-install-recommends fontconfig fonts-dejavu-core &&\
12-
install -d -m 0755 /etc/apt/keyrings &&\
13-
wget -qO - https://packages.adoptium.net/artifactory/api/gpg/key/public | gpg --dearmor | tee /etc/apt/trusted.gpg.d/adoptium.gpg > /dev/null &&\
14-
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 &&\
15-
apt-get update &&\
16-
apt-get install -y temurin-8-jdk temurin-11-jdk temurin-17-jdk temurin-21-jdk &&\
17-
apt-get clean &&\
18-
rm -rf /var/lib/apt/lists/*
10+
RUN apt-get update && \
11+
apt-get install -y --no-install-recommends fontconfig fonts-dejavu-core && \
12+
install -d -m 0755 /etc/apt/keyrings && \
13+
wget -qO - https://packages.adoptium.net/artifactory/api/gpg/key/public | gpg --dearmor | tee /etc/apt/trusted.gpg.d/adoptium.gpg > /dev/null && \
14+
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 && \
15+
apt-get update && \
16+
apt-get install -y temurin-8-jdk temurin-11-jdk temurin-17-jdk temurin-21-jdk && \
17+
apt-get clean && \
18+
rm -rf /var/lib/apt/lists/*

mono/Dockerfile

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

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

5-
LABEL org.opencontainers.image.licenses=MIT
5+
LABEL org.opencontainers.image.licenses=MIT
66

7-
ARG DEBIAN_FRONTEND=noninteractive
7+
ARG DEBIAN_FRONTEND=noninteractive
88

99
# Install required packages and Mono
10-
RUN apt-get update &&\
11-
apt-get install -y --no-install-recommends dirmngr &&\
12-
install -d -m 0755 /etc/apt/keyrings &&\
13-
gpg --homedir /tmp --no-default-keyring --keyring /etc/apt/keyrings/mono-official-archive-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF &&\
14-
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 &&\
15-
apt-get update &&\
16-
apt-get install -y mono-complete &&\
17-
apt-get clean &&\
18-
rm -rf /var/lib/apt/lists/*
10+
RUN apt-get update && \
11+
apt-get install -y --no-install-recommends dirmngr && \
12+
install -d -m 0755 /etc/apt/keyrings && \
13+
gpg --homedir /tmp --no-default-keyring --keyring /etc/apt/keyrings/mono-official-archive-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF && \
14+
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 && \
15+
apt-get update && \
16+
apt-get install -y mono-complete && \
17+
apt-get clean && \
18+
rm -rf /var/lib/apt/lists/*

python/Dockerfile

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

3-
FROM --platform=$TARGETPLATFORM python:3.10-slim-bookworm AS py310
4-
FROM --platform=$TARGETPLATFORM 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 --platform=$TARGETPLATFORM ghcr.io/cubecoders/ampbase:latest
7-
LABEL org.opencontainers.image.licenses=MIT
6+
FROM --platform=$TARGETPLATFORM ghcr.io/cubecoders/ampbase:latest
7+
LABEL org.opencontainers.image.licenses=MIT
88

9-
ENV PIP_DISABLE_PIP_VERSION_CHECK=1
9+
ENV PIP_DISABLE_PIP_VERSION_CHECK=1
1010

11-
ARG DEBIAN_FRONTEND=noninteractive
11+
ARG DEBIAN_FRONTEND=noninteractive
1212

1313
# System Python (3.11) from Debian
14-
RUN apt-get update &&\
15-
apt-get install -y --no-install-recommends python3 python3-pip python3-venv &&\
16-
apt-get clean &&\
17-
rm -rf /var/lib/apt/lists/*
14+
RUN apt-get update && \
15+
apt-get install -y --no-install-recommends python3 python3-pip python3-venv && \
16+
apt-get clean && \
17+
rm -rf /var/lib/apt/lists/*
1818

1919
# Drop in Python 3.10
20-
COPY --from=py310 /usr/local/ /usr/local/
20+
COPY --from=py310 /usr/local/ /usr/local/
2121

2222
# Drop in Python 3.12
23-
COPY --from=py312 /usr/local/ /usr/local/
23+
COPY --from=py312 /usr/local/ /usr/local/
2424

2525
# Make explicit version shims available in /usr/bin
26-
RUN ln -sf /usr/local/bin/python3.10 /usr/bin/python3.10 &&\
27-
ln -sf /usr/local/bin/python3.12 /usr/bin/python3.12 &&\
28-
ln -sf /usr/local/bin/pip3.10 /usr/bin/pip3.10 &&\
29-
ln -sf /usr/local/bin/pip3.12 /usr/bin/pip3.12
26+
RUN ln -sf /usr/local/bin/python3.10 /usr/bin/python3.10 && \
27+
ln -sf /usr/local/bin/python3.12 /usr/bin/python3.12 && \
28+
ln -sf /usr/local/bin/pip3.10 /usr/bin/pip3.10 && \
29+
ln -sf /usr/local/bin/pip3.12 /usr/bin/pip3.12

wine/10/Dockerfile

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
# Wine image based on Wine 10 stable
22

3-
FROM ghcr.io/cubecoders/ampbase:latest
3+
FROM ghcr.io/cubecoders/ampbase:latest
44

5-
LABEL org.opencontainers.image.licenses=MIT
5+
LABEL org.opencontainers.image.licenses=MIT
66

7-
ARG DEBIAN_FRONTEND=noninteractive
7+
ARG DEBIAN_FRONTEND=noninteractive
88

99
# Install required packages and Wine 10 stable
10-
RUN apt-get update &&\
11-
apt-get install -y --no-install-recommends cabextract winbind wine-binfmt python3 &&\
12-
install -d -m 0755 /etc/apt/keyrings &&\
13-
wget -O - https://dl.winehq.org/wine-builds/winehq.key | gpg --dearmor -o /etc/apt/keyrings/winehq-archive.key - &&\
14-
wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/bookworm/winehq-bookworm.sources &&\
15-
apt-get update &&\
16-
apt-get install -y --install-recommends wine-stable-i386=10.0.0.0~bookworm-1\
17-
wine-stable-amd64=10.0.0.0~bookworm-1\
18-
wine-stable=10.0.0.0~bookworm-1\
19-
winehq-stable=10.0.0.0~bookworm-1 &&\
20-
apt-get clean &&\
21-
rm -rf /var/lib/apt/lists/*
10+
RUN apt-get update && \
11+
apt-get install -y --no-install-recommends cabextract winbind wine-binfmt python3 && \
12+
install -d -m 0755 /etc/apt/keyrings && \
13+
wget -O - https://dl.winehq.org/wine-builds/winehq.key | gpg --dearmor -o /etc/apt/keyrings/winehq-archive.key - && \
14+
wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/bookworm/winehq-bookworm.sources && \
15+
apt-get update && \
16+
apt-get install -y --install-recommends \
17+
wine-stable-i386=10.0.0.0~bookworm-1 \
18+
wine-stable-amd64=10.0.0.0~bookworm-1 \
19+
wine-stable=10.0.0.0~bookworm-1 \
20+
winehq-stable=10.0.0.0~bookworm-1 && \
21+
apt-get clean && \
22+
rm -rf /var/lib/apt/lists/*

wine/9/Dockerfile

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
# Wine image based on Wine 9 stable
22

3-
FROM ghcr.io/cubecoders/ampbase:latest
3+
FROM ghcr.io/cubecoders/ampbase:latest
44

5-
LABEL org.opencontainers.image.licenses=MIT
5+
LABEL org.opencontainers.image.licenses=MIT
66

7-
ARG DEBIAN_FRONTEND=noninteractive
7+
ARG DEBIAN_FRONTEND=noninteractive
88

99
# Install required packages and Wine 9 stable
10-
RUN apt-get update &&\
11-
apt-get install -y --no-install-recommends cabextract winbind wine-binfmt python3 &&\
12-
install -d -m 0755 /etc/apt/keyrings &&\
13-
wget -O - https://dl.winehq.org/wine-builds/winehq.key | gpg --dearmor -o /etc/apt/keyrings/winehq-archive.key - &&\
14-
wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/bookworm/winehq-bookworm.sources &&\
15-
apt-get update &&\
16-
apt-get install -y --install-recommends wine-stable-i386=9.0.0.0~bookworm-1\
17-
wine-stable-amd64=9.0.0.0~bookworm-1\
18-
wine-stable=9.0.0.0~bookworm-1\
19-
winehq-stable=9.0.0.0~bookworm-1 &&\
20-
apt-get clean &&\
21-
rm -rf /var/lib/apt/lists/*
10+
RUN apt-get update && \
11+
apt-get install -y --no-install-recommends cabextract winbind wine-binfmt python3 && \
12+
install -d -m 0755 /etc/apt/keyrings && \
13+
wget -O - https://dl.winehq.org/wine-builds/winehq.key | gpg --dearmor -o /etc/apt/keyrings/winehq-archive.key - && \
14+
wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/bookworm/winehq-bookworm.sources && \
15+
apt-get update && \
16+
apt-get install -y --install-recommends \
17+
wine-stable-i386=9.0.0.0~bookworm-1 \
18+
wine-stable-amd64=9.0.0.0~bookworm-1 \
19+
wine-stable=9.0.0.0~bookworm-1 \
20+
winehq-stable=9.0.0.0~bookworm-1 && \
21+
apt-get clean && \
22+
rm -rf /var/lib/apt/lists/*

wine/devel/Dockerfile

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
# Wine image based on Wine devel
22

3-
FROM ghcr.io/cubecoders/ampbase:latest
3+
FROM ghcr.io/cubecoders/ampbase:latest
44

5-
LABEL org.opencontainers.image.licenses=MIT
5+
LABEL org.opencontainers.image.licenses=MIT
66

7-
ARG DEBIAN_FRONTEND=noninteractive
7+
ARG DEBIAN_FRONTEND=noninteractive
88

99
# Install required packages and Wine devel
10-
RUN apt-get update &&\
11-
apt-get install -y --no-install-recommends cabextract winbind wine-binfmt python3 &&\
12-
install -d -m 0755 /etc/apt/keyrings &&\
13-
wget -O - https://dl.winehq.org/wine-builds/winehq.key | gpg --dearmor -o /etc/apt/keyrings/winehq-archive.key - &&\
14-
wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/bookworm/winehq-bookworm.sources &&\
15-
apt-get update &&\
16-
apt-get install -y --install-recommends winehq-devel &&\
17-
apt-get clean &&\
18-
rm -rf /var/lib/apt/lists/*
10+
RUN apt-get update && \
11+
apt-get install -y --no-install-recommends cabextract winbind wine-binfmt python3 && \
12+
install -d -m 0755 /etc/apt/keyrings && \
13+
wget -O - https://dl.winehq.org/wine-builds/winehq.key | gpg --dearmor -o /etc/apt/keyrings/winehq-archive.key - && \
14+
wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/bookworm/winehq-bookworm.sources && \
15+
apt-get update && \
16+
apt-get install -y --install-recommends winehq-devel && \
17+
apt-get clean && \
18+
rm -rf /var/lib/apt/lists/*

wine/stable/Dockerfile

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
# Wine image based on Wine stable
22

3-
FROM ghcr.io/cubecoders/ampbase:latest
3+
FROM ghcr.io/cubecoders/ampbase:latest
44

5-
LABEL org.opencontainers.image.licenses=MIT
5+
LABEL org.opencontainers.image.licenses=MIT
66

7-
ARG DEBIAN_FRONTEND=noninteractive
7+
ARG DEBIAN_FRONTEND=noninteractive
88

99
# Install required packages and Wine stable
10-
RUN apt-get update &&\
11-
apt-get install -y --no-install-recommends cabextract winbind wine-binfmt python3 &&\
12-
install -d -m 0755 /etc/apt/keyrings &&\
13-
wget -O - https://dl.winehq.org/wine-builds/winehq.key | gpg --dearmor -o /etc/apt/keyrings/winehq-archive.key - &&\
14-
wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/bookworm/winehq-bookworm.sources &&\
15-
apt-get update &&\
16-
apt-get install -y --install-recommends winehq-stable &&\
17-
apt-get clean &&\
18-
rm -rf /var/lib/apt/lists/*
10+
RUN apt-get update && \
11+
apt-get install -y --no-install-recommends cabextract winbind wine-binfmt python3 && \
12+
install -d -m 0755 /etc/apt/keyrings && \
13+
wget -O - https://dl.winehq.org/wine-builds/winehq.key | gpg --dearmor -o /etc/apt/keyrings/winehq-archive.key - && \
14+
wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/bookworm/winehq-bookworm.sources && \
15+
apt-get update && \
16+
apt-get install -y --install-recommends winehq-stable && \
17+
apt-get clean && \
18+
rm -rf /var/lib/apt/lists/*

0 commit comments

Comments
 (0)