Skip to content

Commit f3d02f7

Browse files
authored
Merge pull request #18 from CubeCoders/wine-testing
feat: refine wine images, fix/refactor ampstart
2 parents 86f0897 + 4fde7fe commit f3d02f7

File tree

20 files changed

+725
-527
lines changed

20 files changed

+725
-527
lines changed

.github/workflows/base.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ on:
88
- master
99
paths:
1010
- base/**
11-
- scripts/ampstart.sh
11+
- scripts/base/ampstart.sh
1212
permissions:
1313
contents: read
1414
packages: write
1515

1616
jobs:
1717
push:
1818
if: ${{ github.repository_owner == 'CubeCoders' }}
19-
name: "amp:${{ matrix.base }}"
19+
name: 'amp:${{ matrix.base }}'
2020
runs-on: ubuntu-latest
2121
strategy:
2222
fail-fast: false

.github/workflows/java.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ jobs:
3434
only_java:
3535
- 'java/**'
3636
- '!base/**'
37-
- '!scripts/ampstart.sh'
37+
- '!scripts/base/ampstart.sh'
3838
3939
build_and_push:
4040
needs: [check_changes]
4141
if: ${{ github.repository_owner == 'CubeCoders' && ( (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') || (github.event_name == 'push' && needs.check_changes.outputs.only_java == 'true') || github.event_name == 'workflow_dispatch' ) }}
42-
name: "amp:java-${{ matrix.java }}"
42+
name: 'amp:java-${{ matrix.java }}'
4343
runs-on: ubuntu-latest
4444
strategy:
4545
fail-fast: false

.github/workflows/mono.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ jobs:
3434
only_mono:
3535
- 'mono/**'
3636
- '!base/**'
37-
- '!scripts/ampstart.sh'
37+
- '!scripts/base/ampstart.sh'
3838
3939
build_and_push:
4040
needs: [check_changes]
4141
if: ${{ github.repository_owner == 'CubeCoders' && ( (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') || (github.event_name == 'push' && needs.check_changes.outputs.only_mono == 'true') || github.event_name == 'workflow_dispatch' ) }}
42-
name: "amp:mono-${{ matrix.mono }}"
42+
name: 'amp:mono-${{ matrix.mono }}'
4343
runs-on: ubuntu-latest
4444
strategy:
4545
fail-fast: false

.github/workflows/python.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
only_python:
3535
- 'python/**'
3636
- '!base/**'
37-
- '!scripts/ampstart.sh'
37+
- '!scripts/base/ampstart.sh'
3838
3939
build_and_push:
4040
needs: [check_changes]

.github/workflows/wine.yml

Lines changed: 49 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ on:
1111
- master
1212
paths:
1313
- wine/**
14+
- scripts/wine/**
1415

1516
permissions:
1617
contents: read
@@ -34,29 +35,60 @@ jobs:
3435
only_wine:
3536
- 'wine/**'
3637
- '!base/**'
37-
- '!scripts/ampstart.sh'
38+
- '!scripts/base/ampstart.sh'
3839
39-
build_and_push:
40+
build_wine_common:
4041
needs: [check_changes]
4142
if: ${{ github.repository_owner == 'CubeCoders' && ( (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') || (github.event_name == 'push' && needs.check_changes.outputs.only_wine == 'true') || github.event_name == 'workflow_dispatch' ) }}
42-
name: "amp:wine-${{ matrix.wine }}"
43+
name: 'amp:wine-common'
4344
runs-on: ubuntu-latest
4445
strategy:
4546
fail-fast: false
46-
matrix:
47-
wine:
48-
- 9-stable
49-
- 10-stable
50-
- devel
51-
- stable
52-
- staging
5347

5448
steps:
5549
- uses: actions/checkout@v4
5650
with:
5751
ref: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.head_sha || github.sha }}
5852

59-
# - uses: docker/setup-qemu-action@v3
53+
- uses: docker/setup-qemu-action@v3
54+
- uses: docker/setup-buildx-action@v3
55+
56+
- uses: docker/login-action@v3
57+
with:
58+
registry: ghcr.io
59+
username: cubecoders
60+
password: ${{ secrets.GITHUB_TOKEN }}
61+
62+
- uses: docker/build-push-action@v6
63+
with:
64+
context: .
65+
file: ./wine/common/Dockerfile
66+
platforms: linux/amd64,linux/arm64/v8
67+
push: true
68+
pull: true
69+
tags: ghcr.io/cubecoders/amp:wine-common
70+
cache-from: type=gha,scope=${{ github.workflow }}-common
71+
cache-to: type=gha,mode=max,scope=${{ github.workflow }}-common
72+
provenance: mode=max
73+
sbom: true
74+
75+
build_versions:
76+
needs: [build_wine_common]
77+
name: 'amp:wine-${{ matrix.version }}'
78+
runs-on: ubuntu-latest
79+
strategy:
80+
fail-fast: false
81+
matrix:
82+
version:
83+
- stable
84+
- devel
85+
- staging
86+
- 10-stable
87+
- 9-stable
88+
89+
steps:
90+
- uses: actions/checkout@v4
91+
- uses: docker/setup-qemu-action@v3
6092
- uses: docker/setup-buildx-action@v3
6193

6294
- uses: docker/login-action@v3
@@ -68,13 +100,15 @@ jobs:
68100
- uses: docker/build-push-action@v6
69101
with:
70102
context: .
71-
file: ./wine/${{ matrix.wine }}/Dockerfile
103+
file: ./wine/${{ matrix.version }}/Dockerfile
72104
platforms: linux/amd64,linux/arm64/v8
73105
push: true
74106
pull: true
75-
tags: ghcr.io/cubecoders/amp:wine-${{ matrix.wine }}
76-
cache-from: type=gha,scope=${{ github.workflow }}-${{ matrix.wine }}
77-
cache-to: type=gha,mode=max,scope=${{ github.workflow }}-${{ matrix.wine }}
107+
tags: ghcr.io/cubecoders/amp:wine-${{ matrix.version }}
108+
cache-from: |
109+
type=gha,scope=${{ github.workflow }}-wine-common
110+
type=gha,scope=${{ github.workflow }}-wine-${{ matrix.version }}
111+
cache-to: type=gha,mode=max,scope=${{ github.workflow }}-${{ matrix.version }}
78112
provenance: mode=max
79113
sbom: true
80114

base/debian/Dockerfile

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,15 @@ LABEL org.opencontainers.image.source="https://github.com/CubeCoders/docke
77
LABEL org.opencontainers.image.licenses=MIT
88

99
ENV AMP_CONTAINER="DOCKER"
10-
ENV LD_LIBRARY_PATH="./:/opt/cubecoders/amp/:/AMP/"
1110

12-
ARG DEBIAN_FRONTEND=noninteractive
11+
ARG DEBIAN_FRONTEND="noninteractive"
1312
ARG TARGETARCH
1413

1514
# Update base packages and install dependencies
1615
RUN set -eux; \
1716
mkdir -p /usr/share/man/man1; \
1817
apt-get update; \
19-
apt-get install -y \
18+
apt-get install -o APT::Keep-Downloaded-Packages="false" -y \
2019
ca-certificates curl wget tar unzip xz-utils bzip2 \
2120
coreutils procps iproute2 iputils-ping socat jq git git-lfs gnupg tmux dbus \
2221
tini tzdata locales \
@@ -30,63 +29,70 @@ RUN set -eux; \
3029
# Required for Eco
3130
libgdiplus \
3231
# Required for Pavlov VR (and variously some others)
33-
gdb libc++-dev; \
32+
gdb libc++-dev; \
33+
\
3434
case "$TARGETARCH" in \
3535
amd64) \
3636
dpkg --add-architecture i386; \
3737
apt-get update; \
38-
apt-get install -y \
38+
apt-get install -o APT::Keep-Downloaded-Packages="false" -y \
3939
# Required for steamcmd
4040
libgcc-s1:i386 \
4141
# Others
4242
libstdc++6:i386 zlib1g:i386 libbz2-1.0:i386 libcurl4:i386 libcurl3-gnutls:i386 libcurl4-gnutls-dev:i386 \
4343
libncurses6:i386 libncurses5:i386 libtinfo6:i386 libtinfo5:i386 libsdl2-2.0-0:i386 libssl3:i386; \
4444
;; \
45+
\
4546
arm64) \
4647
dpkg --add-architecture armhf; \
4748
apt-get update; \
48-
apt-get install -y \
49+
apt-get install -o APT::Keep-Downloaded-Packages="false" -y \
4950
# Required for steamcmd
5051
libgcc-s1:armhf \
5152
# Others
5253
libstdc++6:armhf zlib1g:armhf libbz2-1.0:armhf libcurl4:armhf libcurl3-gnutls:armhf libcurl4-gnutls-dev:armhf \
5354
libncurses6:armhf libncurses5:armhf libtinfo6:armhf libtinfo5:armhf libsdl2-2.0-0:armhf libssl3:armhf; \
55+
\
5456
# Add box86/box64
5557
install -d -m 0755 /etc/apt/keyrings; \
5658
wget -qO- "https://pi-apps-coders.github.io/box86-debs/KEY.gpg" | gpg --dearmor -o /etc/apt/keyrings/box86-archive-keyring.gpg; \
5759
printf "Types: deb\nURIs: https://Pi-Apps-Coders.github.io/box86-debs/debian\nSuites: ./\nSigned-By: /etc/apt/keyrings/box86-archive-keyring.gpg" | tee /etc/apt/sources.list.d/box86.sources >/dev/null; \
5860
wget -qO- "https://pi-apps-coders.github.io/box64-debs/KEY.gpg" | gpg --dearmor -o /etc/apt/keyrings/box64-archive-keyring.gpg; \
5961
printf "Types: deb\nURIs: https://Pi-Apps-Coders.github.io/box64-debs/debian\nSuites: ./\nSigned-By: /etc/apt/keyrings/box64-archive-keyring.gpg" | tee /etc/apt/sources.list.d/box64.sources >/dev/null; \
6062
apt-get update; \
61-
apt-get install -y \
63+
apt-get install -o APT::Keep-Downloaded-Packages="false" -y \
6264
box86-generic-arm:armhf box64-generic-arm; \
6365
;; \
6466
esac; \
67+
\
6568
# Temp fix if libssl1.1 needed
66-
case "$TARGETARCH" in \
69+
case "${TARGETARCH}" in \
6770
amd64) wget -qO libssl1.1.deb https://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb;; \
6871
arm64) wget -qO libssl1.1.deb https://ports.ubuntu.com/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_arm64.deb;; \
6972
esac; \
7073
apt-get install -y ./libssl1.1.deb; \
7174
rm libssl1.1.deb; \
75+
\
7276
# Install AMP instance manager
73-
case "$TARGETARCH" in \
77+
case "${TARGETARCH}" in \
7478
amd64) wget -q https://cdn-repo.c7rs.com/ampinstmgr-latest.tgz;; \
7579
arm64) wget -q https://cdn-repo.c7rs.com/aarch64/ampinstmgr-latest.tgz;; \
7680
esac; \
7781
tar -xzf ampinstmgr-latest.tgz -C /; \
7882
rm ampinstmgr-latest.tgz; \
83+
\
7984
# Set up locales
8085
sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen; \
8186
locale-gen; \
87+
\
8288
apt-get clean; \
8389
rm -rf /var/lib/apt/lists/*
8490

85-
ENV LANG=en_US.UTF-8
86-
ENV LANGUAGE=en_US:en
87-
ENV LC_ALL=en_US.UTF-8
91+
ENV LANG="en_US.UTF-8"
92+
ENV LANGUAGE="en_US:en"
93+
ENV LC_ALL="en_US.UTF-8"
8894

89-
COPY ./scripts/ampstart.sh /ampstart.sh
95+
COPY ./scripts/base/ampstart.sh /ampstart.sh
9096
RUN chmod +x /ampstart.sh
9197
ENTRYPOINT ["/usr/bin/tini", "-g", "--", "/ampstart.sh"]
9298
CMD []

java/lts/Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,19 @@ FROM ghcr.io/cubecoders/amp:debian
55

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

8-
ARG DEBIAN_FRONTEND=noninteractive
8+
ARG DEBIAN_FRONTEND="noninteractive"
99

1010
# Install required packages and Temurin Java LTS versions
1111
RUN set -eux; \
1212
apt-get update; \
1313
# Add dependencies as per official Adoptium images
14-
apt-get install -y --no-install-recommends fontconfig binutils p11-kit; \
14+
apt-get install -o APT::Keep-Downloaded-Packages="false" -y --no-install-recommends \
15+
fontconfig binutils p11-kit; \
1516
install -d -m 0755 /etc/apt/keyrings; \
1617
wget -qO- https://packages.adoptium.net/artifactory/api/gpg/key/public | gpg --dearmor -o /etc/apt/keyrings/adoptium.gpg; \
1718
printf 'Types: deb\nURIs: https://packages.adoptium.net/artifactory/deb\nSuites: bookworm\nComponents: main\nSigned-By: /etc/apt/keyrings/adoptium.gpg\n' | tee /etc/apt/sources.list.d/adoptium.sources >/dev/null; \
1819
apt-get update; \
19-
apt-get install -y temurin-8-jdk temurin-11-jdk temurin-17-jdk temurin-21-jdk; \
20+
apt-get install -o APT::Keep-Downloaded-Packages="false" -y \
21+
temurin-8-jdk temurin-11-jdk temurin-17-jdk temurin-21-jdk; \
2022
apt-get clean; \
2123
rm -rf /var/lib/apt/lists/*

mono/latest/Dockerfile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,20 @@ FROM ghcr.io/cubecoders/amp:debian
55

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

8-
ARG DEBIAN_FRONTEND=noninteractive
8+
ARG DEBIAN_FRONTEND="noninteractive"
99

1010
# Install required packages and Mono
1111
RUN set -eux; \
1212
apt-get update; \
13-
apt-get install -y --no-install-recommends dirmngr; \
13+
apt-get install -o APT::Keep-Downloaded-Packages="false" -y --no-install-recommends \
14+
dirmngr; \
15+
\
1416
install -d -m 0755 /etc/apt/keyrings; \
1517
gpg --homedir /tmp --no-default-keyring --keyring /etc/apt/keyrings/mono-official-archive-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF; \
1618
printf 'Types: deb\nURIs: https://download.mono-project.com/repo/debian\nSuites: stable-buster\nComponents: main\nSigned-By: /etc/apt/keyrings/mono-official-archive-keyring.gpg\n' | tee /etc/apt/sources.list.d/mono-official-stable.sources >/dev/null; \
1719
apt-get update; \
18-
apt-get install -y mono-complete; \
20+
apt-get install -o APT::Keep-Downloaded-Packages="false" -y \
21+
mono-complete; \
22+
\
1923
apt-get clean; \
2024
rm -rf /var/lib/apt/lists/*

python/3.11/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
FROM ghcr.io/cubecoders/amp:debian
55
LABEL org.opencontainers.image.licenses=MIT
66

7-
ENV PIP_DISABLE_PIP_VERSION_CHECK=1
7+
ENV PIP_DISABLE_PIP_VERSION_CHECK="1"
88

9-
ARG DEBIAN_FRONTEND=noninteractive
9+
ARG DEBIAN_FRONTEND="noninteractive"
1010

1111
# System Python (3.11) from Debian
1212
RUN set -eux; \
1313
apt-get update; \
14-
apt-get install -y --no-install-recommends \
14+
apt-get install -o APT::Keep-Downloaded-Packages="false" -y --no-install-recommends \
1515
python3 python3-venv python3-pip; \
1616
apt-get clean; \
1717
rm -rf /var/lib/apt/lists/*

python/3/Dockerfile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ FROM python:3.12-slim-bookworm AS py312
77
FROM ghcr.io/cubecoders/amp:python-3.11
88
LABEL org.opencontainers.image.licenses=MIT
99

10-
ENV PIP_DISABLE_PIP_VERSION_CHECK=1
11-
12-
ARG DEBIAN_FRONTEND=noninteractive
10+
ARG DEBIAN_FRONTEND="noninteractive"
1311

1412
# Drop in upstream Python 3.10
1513
COPY --from=py310 /usr/local/bin/python3.10 /usr/local/bin/
@@ -28,5 +26,5 @@ RUN set -eux; \
2826
python3.10 -m pip --no-cache-dir install --upgrade pip setuptools wheel; \
2927
python3.12 -m pip --no-cache-dir install --upgrade pip setuptools wheel; \
3028
for shim in python3.10 python3.12 pip3.10 pip3.12; do \
31-
ln -sf "/usr/local/bin/$shim" "/usr/bin/$shim"; \
29+
ln -sf "/usr/local/bin/${shim}" "/usr/bin/${shim}"; \
3230
done

0 commit comments

Comments
 (0)