Skip to content

Commit b3367b4

Browse files
committed
Add debian stable based image to build swt natives
Currently we build the swt natives with centos-8 but this is now gone, also centos-9 no longer provides stable releases but only rolling-streams, This adds a new container based on debian stable and only adds the absolute minimum required to build the swt natives. Why Debian: Debian offers quite conservative dependencies and LTS releases so there is a good chance to have a common baseline that works on more ahead distributions as well (e.g. GClib /GTK/... versions).
1 parent f57fce0 commit b3367b4

File tree

3 files changed

+36
-0
lines changed

3 files changed

+36
-0
lines changed

JenkinsJobs/Builds/DockerImagesBuild.jenkinsfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ pipeline {
2424
script {
2525
dir('eclipse.platform.releng.aggregator/cje-production/dockerfiles') {
2626
parallel(
27+
'debian-swtnative': { buildAndPushImage('debian/swtnativebuild', 'eclipse/platformreleng-debian-swtnativebuild:12') },
2728
'centos9-gtk4': { buildAndPushImage('centos-gtk4-mutter/9-gtk4', 'eclipse/platformreleng-centos-gtk4-mutter:9') },
2829
'centos9-gtk4-swt': { buildAndPushImage('centos-gtk4-mutter/9-swtBuild', 'eclipse/platformreleng-centos-swt-build:9') },
2930
'opensuse-gtk3': { buildAndPushImage('opensuse-gtk3-metacity/15-gtk3', 'eclipse/platformreleng-opensuse-gtk3-metacity:15') },
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
FROM debian:12
2+
3+
### user name recognition at runtime w/ an arbitrary uid - for OpenShift deployments
4+
COPY scripts/uid_entrypoint /usr/local/bin/uid_entrypoint
5+
RUN chmod u+x /usr/local/bin/uid_entrypoint && \
6+
chgrp 0 /usr/local/bin/uid_entrypoint && \
7+
chmod g=u /usr/local/bin/uid_entrypoint /etc/passwd
8+
### end
9+
10+
ENV LANG=en_US.UTF-8
11+
RUN apt-get update -qq && apt-get install -qq -y locales libgtk-3-dev libgtk-4-dev freeglut3-dev webkit2gtk-driver build-essential default-jdk
12+
13+
ENV HOME=/home/swtbuild
14+
ENV DISPLAY :0
15+
RUN useradd -u 10001 -d ${HOME} testuser
16+
17+
RUN mkdir -p /var/lib/dbus && dbus-uuidgen > /var/lib/dbus/machine-id \
18+
&& mkdir -p /var/run/dbus
19+
20+
# Make $HOME open to the 'root' group (so Jenkins/OpenShift user can write there)
21+
WORKDIR $HOME
22+
RUN chgrp -R 0 ${HOME} && chmod -R g=u ${HOME}
23+
24+
RUN localedef -i en_US -f UTF-8 en_US.UTF-8
25+
ENV LANG=en_US.UTF-8
26+
ENV SWT_JAVA_HOME=/usr/lib/jvm/default-java/
27+
28+
USER 10001
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env sh
2+
if ! whoami > /dev/null 2>&1; then
3+
if [ -w /etc/passwd ]; then
4+
echo "${USER_NAME:-default}:x:$(id -u):0:${USER_NAME:-default} user:${HOME}:/sbin/nologin" >> /etc/passwd
5+
fi
6+
fi
7+
exec "$@"

0 commit comments

Comments
 (0)