osmith submitted this change.

View Change

Approvals: fixeria: Looks good to me, but someone else must approve Jenkins Builder: Verified pespin: Looks good to me, approved
debian-bookworm-aram-applet: new container

Add a container for building aram-applet.

Related: SYS#7293
Change-Id: I6ed01bb837bffe6581a4c0d0b1cda39abb375fd5
---
A debian-bookworm-aram-applet/Dockerfile
A debian-bookworm-aram-applet/Makefile
2 files changed, 43 insertions(+), 0 deletions(-)

diff --git a/debian-bookworm-aram-applet/Dockerfile b/debian-bookworm-aram-applet/Dockerfile
new file mode 100644
index 0000000..5151fd5
--- /dev/null
+++ b/debian-bookworm-aram-applet/Dockerfile
@@ -0,0 +1,40 @@
+# Image for building https://gitea.osmocom.org/sim-card/aram-applet
+ARG REGISTRY=docker.io
+ARG UPSTREAM_DISTRO=debian:bookworm
+FROM ${REGISTRY}/${UPSTREAM_DISTRO}
+ARG UID
+ENV APT_INSTALL="apt-get install -y --no-install-recommends"
+ENV SOURCES_LIST="/etc/apt/sources.list.d/debian9-sources.list"
+
+# Add the build user
+RUN useradd --uid=${UID} -m build && \
+ mkdir /cache /build && \
+ chown build:build /cache /build
+
+# Install openjdk-8 from Debian 9
+# (x11-common gets pulled in as dep and must be installed first or it fails)
+RUN set -x && \
+ apt-get update && \
+ $APT_INSTALL ca-certificates && \
+ echo "deb [trusted=yes] https://archive.debian.org/debian stretch main" >>"$SOURCES_LIST" && \
+ echo "deb [trusted=yes] https://archive.debian.org/debian-security stretch/updates main" >>"$SOURCES_LIST" && \
+ apt-get update && \
+ $APT_INSTALL x11-common && \
+ $APT_INSTALL -t stretch ca-certificates-java openjdk-8-jdk-headless && \
+ apt-get clean
+
+# Install other packages
+RUN set -x && \
+ apt-get update && \
+ $APT_INSTALL git && \
+ apt-get clean
+
+USER build
+
+# Build aram-applet once to download and cache dependencies
+ADD https://gerrit.osmocom.org/plugins/gitiles/aram-applet/+/refs/heads/master/build.gradle?format=TEXT /tmp/build.gradle
+RUN set -x && \
+ git -C /cache clone --depth=1 https://gerrit.osmocom.org/aram-applet && \
+ cd /cache/aram-applet && \
+ git submodule update --init && \
+ ./gradlew build
diff --git a/debian-bookworm-aram-applet/Makefile b/debian-bookworm-aram-applet/Makefile
new file mode 100644
index 0000000..cdac90c
--- /dev/null
+++ b/debian-bookworm-aram-applet/Makefile
@@ -0,0 +1,3 @@
+UPSTREAM_DISTRO=debian:bookworm
+DISTRO=debian-bookworm
+include ../make/Makefile

To view, visit change 39585. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: merged
Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I6ed01bb837bffe6581a4c0d0b1cda39abb375fd5
Gerrit-Change-Number: 39585
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier@sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: osmith <osmith@sysmocom.de>
Gerrit-Reviewer: pespin <pespin@sysmocom.de>