Skip to content

Commit dae0130

Browse files
committed
Add new image Dockerfiles and actions workflows
1 parent 557e849 commit dae0130

File tree

15 files changed

+598
-0
lines changed

15 files changed

+598
-0
lines changed

.github/workflows/base.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: build base
2+
on:
3+
workflow_dispatch:
4+
schedule:
5+
- cron: "0 0 * * 1"
6+
push:
7+
branches:
8+
- master
9+
paths:
10+
- base/**
11+
- scripts/ampstart.sh
12+
permissions:
13+
contents: read
14+
packages: write
15+
16+
jobs:
17+
push:
18+
if: ${{ github.repository_owner == 'CubeCoders' }}
19+
name: "amp:${{ matrix.base }}"
20+
runs-on: ubuntu-latest
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
base:
25+
- debian
26+
steps:
27+
- uses: actions/checkout@v4
28+
- uses: docker/setup-qemu-action@v3
29+
- uses: docker/setup-buildx-action@v3
30+
- uses: docker/login-action@v3
31+
with:
32+
registry: ghcr.io
33+
username: cubecoders
34+
password: ${{ secrets.GITHUB_TOKEN }}
35+
- uses: docker/build-push-action@v6
36+
with:
37+
context: .
38+
file: ./base/${{ matrix.base }}/Dockerfile
39+
platforms: linux/amd64,linux/arm64/v8
40+
push: true
41+
tags: |
42+
ghcr.io/cubecoders/amp:${{ matrix.base }}
43+
cache-from: type=gha,scope=${{ github.workflow }}-${{ matrix.base }}
44+
cache-to: type=gha,mode=max,scope=${{ github.workflow }}-${{ matrix.base }}
45+
provenance: mode=max
46+
sbom: true
47+
48+
concurrency:
49+
group: ${{ github.workflow }}-${{ github.ref }}
50+
cancel-in-progress: false

.github/workflows/java.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: build java
2+
on:
3+
workflow_dispatch:
4+
workflow_run:
5+
workflows: ['base.yml']
6+
types: [completed]
7+
branches:
8+
- master
9+
push:
10+
branches:
11+
- master
12+
paths:
13+
- java/**
14+
15+
permissions:
16+
contents: read
17+
packages: write
18+
19+
jobs:
20+
push:
21+
if: ${{ github.repository_owner == 'CubeCoders' && ( (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') || github.event_name == 'push' || github.event_name == 'workflow_dispatch' ) }}
22+
name: "amp:java-${{ matrix.java }}"
23+
runs-on: ubuntu-latest
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
java:
28+
- lts
29+
30+
steps:
31+
- uses: actions/checkout@v4
32+
with:
33+
ref: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.head_sha || github.sha }}
34+
35+
- uses: docker/setup-qemu-action@v3
36+
- uses: docker/setup-buildx-action@v3
37+
38+
- uses: docker/login-action@v3
39+
with:
40+
registry: ghcr.io
41+
username: cubecoders
42+
password: ${{ secrets.GITHUB_TOKEN }}
43+
44+
- uses: docker/build-push-action@v6
45+
with:
46+
context: .
47+
file: ./java/${{ matrix.java }}/Dockerfile
48+
platforms: linux/amd64,linux/arm64/v8
49+
push: true
50+
pull: true
51+
tags: ghcr.io/cubecoders/amp:java-${{ matrix.java }}
52+
cache-from: type=gha,scope=${{ github.workflow }}-${{ matrix.java }}
53+
cache-to: type=gha,mode=max,scope=${{ github.workflow }}-${{ matrix.java }}
54+
provenance: mode=max
55+
sbom: true
56+
57+
concurrency:
58+
group: ${{ github.workflow }}-${{ github.ref }}
59+
cancel-in-progress: false

.github/workflows/mono.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: build mono
2+
on:
3+
workflow_dispatch:
4+
workflow_run:
5+
workflows: ['base.yml']
6+
types: [completed]
7+
branches:
8+
- master
9+
push:
10+
branches:
11+
- master
12+
paths:
13+
- mono/**
14+
15+
permissions:
16+
contents: read
17+
packages: write
18+
19+
jobs:
20+
push:
21+
if: ${{ github.repository_owner == 'CubeCoders' && ( (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') || github.event_name == 'push' || github.event_name == 'workflow_dispatch' ) }}
22+
name: "amp:mono-${{ matrix.mono }}"
23+
runs-on: ubuntu-latest
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
mono:
28+
- latest
29+
30+
steps:
31+
- uses: actions/checkout@v4
32+
with:
33+
ref: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.head_sha || github.sha }}
34+
35+
- uses: docker/setup-qemu-action@v3
36+
- uses: docker/setup-buildx-action@v3
37+
38+
- uses: docker/login-action@v3
39+
with:
40+
registry: ghcr.io
41+
username: cubecoders
42+
password: ${{ secrets.GITHUB_TOKEN }}
43+
44+
- uses: docker/build-push-action@v6
45+
with:
46+
context: .
47+
file: ./mono/${{ matrix.mono }}/Dockerfile
48+
platforms: linux/amd64,linux/arm64/v8
49+
push: true
50+
pull: true
51+
tags: ghcr.io/cubecoders/amp:mono-${{ matrix.mono }}
52+
cache-from: type=gha,scope=${{ github.workflow }}-${{ matrix.mono }}
53+
cache-to: type=gha,mode=max,scope=${{ github.workflow }}-${{ matrix.mono }}
54+
provenance: mode=max
55+
sbom: true
56+
57+
concurrency:
58+
group: ${{ github.workflow }}-${{ github.ref }}
59+
cancel-in-progress: false

.github/workflows/python.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: build python
2+
on:
3+
workflow_dispatch:
4+
workflow_run:
5+
workflows: ['base.yml']
6+
types: [completed]
7+
branches:
8+
- master
9+
push:
10+
branches:
11+
- master
12+
paths:
13+
- python/**
14+
15+
permissions:
16+
contents: read
17+
packages: write
18+
19+
jobs:
20+
push:
21+
if: ${{ github.repository_owner == 'CubeCoders' && ( (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') || github.event_name == 'push' || github.event_name == 'workflow_dispatch' ) }}
22+
name: "amp:python-${{ matrix.python }}"
23+
runs-on: ubuntu-latest
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
python:
28+
- '3'
29+
30+
steps:
31+
- uses: actions/checkout@v4
32+
with:
33+
ref: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.head_sha || github.sha }}
34+
35+
- uses: docker/setup-qemu-action@v3
36+
- uses: docker/setup-buildx-action@v3
37+
38+
- uses: docker/login-action@v3
39+
with:
40+
registry: ghcr.io
41+
username: cubecoders
42+
password: ${{ secrets.GITHUB_TOKEN }}
43+
44+
- uses: docker/build-push-action@v6
45+
with:
46+
context: .
47+
file: ./python/${{ matrix.python }}/Dockerfile
48+
platforms: linux/amd64,linux/arm64/v8
49+
push: true
50+
pull: true
51+
tags: ghcr.io/cubecoders/amp:python-${{ matrix.python }}
52+
cache-from: type=gha,scope=${{ github.workflow }}-${{ matrix.python }}
53+
cache-to: type=gha,mode=max,scope=${{ github.workflow }}-${{ matrix.python }}
54+
provenance: mode=max
55+
sbom: true
56+
57+
concurrency:
58+
group: ${{ github.workflow }}-${{ github.ref }}
59+
cancel-in-progress: false

.github/workflows/wine.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: build wine
2+
on:
3+
workflow_dispatch:
4+
workflow_run:
5+
workflows: ['base.yml']
6+
types: [completed]
7+
branches:
8+
- master
9+
push:
10+
branches:
11+
- master
12+
paths:
13+
- wine/**
14+
15+
permissions:
16+
contents: read
17+
packages: write
18+
19+
jobs:
20+
push:
21+
if: ${{ github.repository_owner == 'CubeCoders' && ( (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') || github.event_name == 'push' || github.event_name == 'workflow_dispatch' ) }}
22+
name: "amp:wine-${{ matrix.wine }}"
23+
runs-on: ubuntu-latest
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
wine:
28+
- 9-stable
29+
- 10-stable
30+
- devel
31+
- stable
32+
- staging
33+
34+
steps:
35+
- uses: actions/checkout@v4
36+
with:
37+
ref: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.head_sha || github.sha }}
38+
39+
# - uses: docker/setup-qemu-action@v3
40+
- uses: docker/setup-buildx-action@v3
41+
42+
- uses: docker/login-action@v3
43+
with:
44+
registry: ghcr.io
45+
username: cubecoders
46+
password: ${{ secrets.GITHUB_TOKEN }}
47+
48+
- uses: docker/build-push-action@v6
49+
with:
50+
context: .
51+
file: ./wine/${{ matrix.wine }}/Dockerfile
52+
platforms: linux/amd64
53+
push: true
54+
pull: true
55+
tags: ghcr.io/cubecoders/amp:wine-${{ matrix.wine }}
56+
cache-from: type=gha,scope=${{ github.workflow }}-${{ matrix.wine }}
57+
cache-to: type=gha,mode=max,scope=${{ github.workflow }}-${{ matrix.wine }}
58+
provenance: mode=max
59+
sbom: true
60+
61+
concurrency:
62+
group: ${{ github.workflow }}-${{ github.ref }}
63+
cancel-in-progress: false

base/debian/Dockerfile

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Base Debian 12 image for AMP containers
2+
# ghcr.io/cubecoders/amp:debian
3+
4+
FROM debian:bookworm-slim
5+
6+
LABEL org.opencontainers.image.source="https://github.com/CubeCoders/dockerfiles"
7+
LABEL org.opencontainers.image.licenses=MIT
8+
9+
ENV AMP_CONTAINER="DOCKER"
10+
ENV LD_LIBRARY_PATH="./:/opt/cubecoders/amp/:/AMP/"
11+
12+
ARG DEBIAN_FRONTEND=noninteractive
13+
ARG TARGETARCH
14+
15+
# Update base packages and install dependencies, including temp fix if libssl1.1 needed
16+
RUN set -eu; \
17+
mkdir -p /usr/share/man/man1; \
18+
apt-get update; \
19+
apt-get install -y --no-install-recommends \
20+
ca-certificates software-properties-common curl wget tar unzip xz-utils bzip2 \
21+
coreutils procps net-tools iproute2 iputils-ping socat jq git git-lfs gnupg lsof tmux sqlite3 gdb \
22+
tini tzdata locales \
23+
xvfb xauth libxi6 \
24+
libc6 libc++-dev libcurl4 libatomic1 libpulse-dev liblua5.3-0 libfontconfig1 libgdiplus libsqlite3-0 libzstd1 libsdl2-2.0-0 libsdl1.2-compat; \
25+
if [ "$TARGETARCH" = "amd64" ]; then \
26+
dpkg --add-architecture i386; \
27+
apt-get update; \
28+
apt-get install -y --no-install-recommends \
29+
libc6:i386 libstdc++6:i386 libgcc-s1:i386 zlib1g:i386 libbz2-1.0:i386 libzstd1:i386 libcurl4:i386 libcurl3-gnutls:i386 libcurl4-gnutls-dev:i386 \
30+
libtinfo6:i386 libncurses6:i386 libncurses5:i386 libtinfo5:i386 libsdl2-2.0-0:i386 libsdl1.2-compat:i386 libssl-dev:i386; \
31+
fi; \
32+
case "$TARGETARCH" in \
33+
amd64) wget -qO libssl1.1.deb https://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb ;; \
34+
arm64) wget -qO libssl1.1.deb https://ports.ubuntu.com/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_arm64.deb ;; \
35+
esac; \
36+
apt-get install -y --no-install-recommends ./libssl1.1.deb; \
37+
rm libssl1.1.deb; \
38+
case "$TARGETARCH" in \
39+
amd64) wget -q https://cdn-repo.c7rs.com/ampinstmgr-latest.tgz ;; \
40+
arm64) wget -q https://cdn-repo.c7rs.com/aarch64/ampinstmgr-latest.tgz ;; \
41+
esac; \
42+
tar -xzf ampinstmgr-latest.tgz -C /; \
43+
rm ampinstmgr-latest.tgz; \
44+
sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen; \
45+
locale-gen; \
46+
apt-get clean; \
47+
rm -rf /var/lib/apt/lists/*
48+
49+
ENV LANG=en_US.UTF-8
50+
ENV LANGUAGE=en_US:en
51+
ENV LC_ALL=en_US.UTF-8
52+
53+
COPY ./scripts/ampstart.sh /ampstart.sh
54+
RUN chmod +x /ampstart.sh
55+
ENTRYPOINT ["/usr/bin/tini", "-g", "--"]
56+
CMD ["/ampstart.sh"]

java/lts/Dockerfile

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

mono/latest/Dockerfile

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

0 commit comments

Comments
 (0)