Skip to content

Commit f81843d

Browse files
committed
Add new image Dockerfiles
First pass
1 parent 557e849 commit f81843d

10 files changed

Lines changed: 262 additions & 0 deletions

File tree

base/ampbase/Dockerfile

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
FROM debian:bookworm-slim
2+
3+
LABEL org.opencontainers.image.source="https://github.com/CubeCoders/dockerfiles"
4+
LABEL org.opencontainers.image.licenses=MIT
5+
6+
ENV DEBIAN_FRONTEND=noninteractive
7+
ENV AMP_CONTAINER="DOCKER"
8+
ENV LD_LIBRARY_PATH="./:/opt/cubecoders/amp/:/AMP/"
9+
10+
# Update base packages and install dependencies
11+
RUN mkdir -p /usr/share/man/man1 &&\
12+
dpkg --add-architecture i386 &&\
13+
apt-get update &&\
14+
apt-get install -y --no-install-recommends ca-certificates software-properties-common curl wget tar unzip xz-utils bzip2\
15+
coreutils procps net-tools iproute2 inetutils-ping socat jq git git-lfs gnupg lsof tmux sqlite3 gdb\
16+
tini tzdata locales\
17+
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 &&\
20+
apt-get clean &&\
21+
rm -rf /var/lib/apt/lists/* &&\
22+
wget -q https://cdn-repo.c7rs.com/ampinstmgr-latest.tgz &&\
23+
tar -xf ampinstmgr-latest.tgz -C / &&\
24+
rm ampinstmgr-latest.tgz
25+
26+
# 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
30+
31+
# Configure locale
32+
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen &&\
33+
locale-gen
34+
35+
ENV LANG=en_US.UTF-8
36+
ENV LANGUAGE=en_US:en
37+
ENV LC_ALL=en_US.UTF-8
38+
39+
COPY ./scripts/ampstart.sh /ampstart.sh
40+
RUN chmod +x /ampstart.sh
41+
ENTRYPOINT ["/usr/bin/tini", "-g", "--"]
42+
CMD ["/ampstart.sh"]

java/Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Java image including all Temurin LTS versions
2+
3+
FROM cubecoders/ampbase:latest
4+
5+
LABEL org.opencontainers.image.licenses=MIT
6+
7+
# Install required packages and Temurin Java LTS versions
8+
RUN apt-get update &&\
9+
apt-get install -y --no-install-recommends fontconfig libfreetype6 fonts-dejavu-core &&\
10+
mkdir -pm755 /etc/apt/keyrings &&\
11+
wget -qO - https://packages.adoptium.net/artifactory/api/gpg/key/public | gpg --dearmor | tee /etc/apt/trusted.gpg.d/adoptium.gpg > /dev/null &&\
12+
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 &&\
13+
apt-get update &&\
14+
apt-get install -y temurin-8-jdk temurin-11-jdk temurin-17-jdk temurin-18-jdk temurin-21-jdk &&\
15+
apt-get clean &&\
16+
rm -rf /var/lib/apt/lists/*

mono/Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Mono image
2+
3+
FROM ghcr.io/cubecoders/ampbase:latest
4+
5+
LABEL org.opencontainers.image.licenses=MIT
6+
7+
# Install required packages and Mono
8+
RUN apt-get update &&\
9+
apt-get install -y --no-install-recommends dirmngr &&\
10+
mkdir -pm755 /etc/apt/keyrings &&\
11+
gpg --homedir /tmp --no-default-keyring --keyring /etc/apt/keyrings/mono-official-archive-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF &&\
12+
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 &&\
13+
apt-get update &&\
14+
apt-get install -y --install-recommends mono-complete &&\
15+
apt-get clean &&\
16+
rm -rf /var/lib/apt/lists/*

python/Dockerfile

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Python image for Python 3.10, 3.11 and 3.12
2+
3+
FROM python:3.10-slim-bookworm AS py310
4+
FROM python:3.12-slim-bookworm AS py312
5+
6+
FROM ghcr.io/cubecoders/ampbase:latest
7+
LABEL org.opencontainers.image.licenses=MIT
8+
9+
ENV DEBIAN_FRONTEND=noninteractive
10+
ENV PIP_DISABLE_PIP_VERSION_CHECK=1
11+
12+
# System Python (3.11) from Debian
13+
RUN apt-get update &&\
14+
apt-get install -y python3 python3-pip python3-venv &&\
15+
apt-get clean &&\
16+
rm -rf /var/lib/apt/lists/*
17+
18+
# Drop in Python 3.10
19+
COPY --from=py310 /usr/local/ /usr/local/
20+
21+
# Drop in Python 3.12
22+
COPY --from=py312 /usr/local/ /usr/local/
23+
24+
# Make explicit version shims available in /usr/bin
25+
RUN ln -sf /usr/local/bin/python3.10 /usr/bin/python3.10 &&\
26+
ln -sf /usr/local/bin/python3.12 /usr/bin/python3.12 &&\
27+
ln -sf /usr/local/bin/pip3.10 /usr/bin/pip3.10 &&\
28+
ln -sf /usr/local/bin/pip3.12 /usr/bin/pip3.12

scripts/ampstart.sh

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
#!/bin/bash
2+
3+
echo "[Info] AMPStart for Docker - v23.07.1"
4+
INSTALLED_DEPS_FILE="/AMP/InstalledDeps.json"
5+
ARCH=$(uname -m)
6+
7+
if [ -z "${AMPUSERID}" ]; then
8+
echo "[Info] This docker image cannot be used directly by itself - it must be started by ampinstmgr"
9+
exit 100
10+
fi
11+
12+
#Check if the AMP user already exists
13+
getent passwd amp &> /dev/null
14+
15+
if [ "$?" == "0" ]; then
16+
echo "[Info] AMP user already exists, continuing..."
17+
else
18+
echo "[Info] Performing first-time container setup..."
19+
groupadd -r -g $AMPGROUPID amp > /dev/null
20+
useradd -m -d /home/amp -s /bin/bash -c "AMP Process User" -u $AMPUSERID -g $AMPGROUPID amp > /dev/null
21+
touch /home/amp/.gitconfig
22+
chown -R amp:amp /home/amp 2> /dev/null
23+
usermod -aG tty amp
24+
chmod +x /AMP/AMP_Linux_$ARCH
25+
echo "[Info] Container setup complete."
26+
fi
27+
28+
if [ -f "$INSTALLED_DEPS_FILE" ]; then
29+
INSTALLED_DEPS=$(jq -r '.[]' $INSTALLED_DEPS_FILE)
30+
else
31+
INSTALLED_DEPS=""
32+
echo "[]" > $INSTALLED_DEPS_FILE
33+
fi
34+
35+
REQUIRED_DEPS=$(echo $AMP_CONTAINER_DEPS | jq -r '.[]')
36+
37+
DEPS_TO_INSTALL=()
38+
for DEP in $REQUIRED_DEPS; do
39+
if ! [[ $INSTALLED_DEPS =~ $DEP ]]; then
40+
DEPS_TO_INSTALL+=($DEP)
41+
fi
42+
done
43+
44+
if [ ${#DEPS_TO_INSTALL[@]} -ne 0 ]; then
45+
echo "[Info] Installing dependencies..."
46+
apt-get update
47+
apt-get install -y --allow-downgrades ${DEPS_TO_INSTALL[@]}
48+
apt-get clean
49+
rm -rf /var/lib/apt/lists/*
50+
echo "[Info] Installation complete."
51+
else
52+
echo "[Info] No missing dependencies to install."
53+
fi
54+
55+
if [ -n "$AMP_MOUNTPOINTS" ]; then
56+
echo "[Info] Updating mountpoint permissions..."
57+
IFS=':' read -r -a dirs <<< "$AMP_MOUNTPOINTS"
58+
59+
for dir in "${dirs[@]}"; do
60+
echo "[Info] - Updating $dir..."
61+
chown -R amp:amp "$dir"
62+
done
63+
fi
64+
65+
export AMPHOSTPLATFORM
66+
export AMP_CONTAINER
67+
export AMPMEMORYLIMIT
68+
export AMPSWAPLIMIT
69+
export AMPCONTAINERCPUS
70+
export AMP_CONTAINER_HOST_NETWORK
71+
72+
ARGS=$@
73+
exec su -l -w AMPHOSTPLATFORM,AMP_CONTAINER,AMPMEMORYLIMIT,AMP_CONTAINER_HOST_NETWORK,AMPSWAPLIMIT,AMPCONTAINERCPUS -c "ampinstmgr --sync-certs; cd /AMP; HOME=/home/amp /AMP/AMP_Linux_$ARCH ${ARGS}; exit $?" -- amp
74+
exit $?

wine/10/Dockerfile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Wine image based on Wine 10 stable
2+
3+
FROM ghcr.io/cubecoders/ampbase:latest
4+
5+
LABEL org.opencontainers.image.licenses=MIT
6+
7+
# Install required packages and Wine 10 stable
8+
RUN apt-get update &&\
9+
apt-get install -y --no-install-recommends cabextract winbind wine-binfmt python3 &&\
10+
mkdir -pm755 /etc/apt/keyrings &&\
11+
wget -O - https://dl.winehq.org/wine-builds/winehq.key | gpg --dearmor -o /etc/apt/keyrings/winehq-archive.key - &&\
12+
wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/bookworm/winehq-bookworm.sources &&\
13+
apt-get update &&\
14+
apt-get install -y --install-recommends wine-stable-i386=10.0.0.0~bookworm-1\
15+
wine-stable-amd64=10.0.0.0~bookworm-1\
16+
wine-stable=10.0.0.0~bookworm-1\
17+
winehq-stable=10.0.0.0~bookworm-1 &&\
18+
apt-get clean &&\
19+
rm -rf /var/lib/apt/lists/*

wine/9/Dockerfile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Wine image based on Wine 9 stable
2+
3+
FROM ghcr.io/cubecoders/ampbase:latest
4+
5+
LABEL org.opencontainers.image.licenses=MIT
6+
7+
# Install required packages and Wine 9 stable
8+
RUN apt-get update &&\
9+
apt-get install -y --no-install-recommends cabextract winbind wine-binfmt python3 &&\
10+
mkdir -pm755 /etc/apt/keyrings &&\
11+
wget -O - https://dl.winehq.org/wine-builds/winehq.key | gpg --dearmor -o /etc/apt/keyrings/winehq-archive.key - &&\
12+
wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/bookworm/winehq-bookworm.sources &&\
13+
apt-get update &&\
14+
apt-get install -y --install-recommends wine-stable-i386=9.0.0.0~bookworm-1\
15+
wine-stable-amd64=9.0.0.0~bookworm-1\
16+
wine-stable=9.0.0.0~bookworm-1\
17+
winehq-stable=9.0.0.0~bookworm-1 &&\
18+
apt-get clean &&\
19+
rm -rf /var/lib/apt/lists/*

wine/devel/Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Wine image based on Wine devel
2+
3+
FROM ghcr.io/cubecoders/ampbase:latest
4+
5+
LABEL org.opencontainers.image.licenses=MIT
6+
7+
# Install required packages and Wine devel
8+
RUN apt-get update &&\
9+
apt-get install -y --no-install-recommends cabextract winbind wine-binfmt python3 &&\
10+
mkdir -pm755 /etc/apt/keyrings &&\
11+
wget -O - https://dl.winehq.org/wine-builds/winehq.key | gpg --dearmor -o /etc/apt/keyrings/winehq-archive.key - &&\
12+
wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/bookworm/winehq-bookworm.sources &&\
13+
apt-get update &&\
14+
apt-get install -y --install-recommends winehq-devel &&\
15+
apt-get clean &&\
16+
rm -rf /var/lib/apt/lists/*

wine/stable/Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Wine image based on Wine stable
2+
3+
FROM ghcr.io/cubecoders/ampbase:latest
4+
5+
LABEL org.opencontainers.image.licenses=MIT
6+
7+
# Install required packages and Wine stable
8+
RUN apt-get update &&\
9+
apt-get install -y --no-install-recommends cabextract winbind wine-binfmt python3 &&\
10+
mkdir -pm755 /etc/apt/keyrings &&\
11+
wget -O - https://dl.winehq.org/wine-builds/winehq.key | gpg --dearmor -o /etc/apt/keyrings/winehq-archive.key - &&\
12+
wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/bookworm/winehq-bookworm.sources &&\
13+
apt-get update &&\
14+
apt-get install -y --install-recommends winehq-stable &&\
15+
apt-get clean &&\
16+
rm -rf /var/lib/apt/lists/*

wine/staging/Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Wine image based on Wine staging
2+
3+
FROM ghcr.io/cubecoders/ampbase:latest
4+
5+
LABEL org.opencontainers.image.licenses=MIT
6+
7+
# Install required packages and Wine staging
8+
RUN apt-get update &&\
9+
apt-get install -y --no-install-recommends cabextract winbind wine-binfmt python3 &&\
10+
mkdir -pm755 /etc/apt/keyrings &&\
11+
wget -O - https://dl.winehq.org/wine-builds/winehq.key | gpg --dearmor -o /etc/apt/keyrings/winehq-archive.key - &&\
12+
wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/bookworm/winehq-bookworm.sources &&\
13+
apt-get update &&\
14+
apt-get install -y --install-recommends winehq-staging &&\
15+
apt-get clean &&\
16+
rm -rf /var/lib/apt/lists/*

0 commit comments

Comments
 (0)