Skip to content

Commit

Permalink
Add debian oldstable based image to build swt natives
Browse files Browse the repository at this point in the history
Currently we build the swt natives with centos-8 but this is now gone,
also centos no longer provides stable releases but only rolling-streams,

This adds a new container based on debian oldstable 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 most
 more ahead distributions as well (e.g. GClib /GTK/... versions).

Why oldstable:
 The oldstable is a small increment to cento-8 that slightly lift
 the requirement of libc so users at very old distributions can
 catch-up.
  • Loading branch information
laeubi committed Oct 8, 2024
1 parent 48d34ac commit 81d533c
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 0 deletions.
1 change: 1 addition & 0 deletions JenkinsJobs/Builds/DockerImagesBuild.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ pipeline {
script {
dir('eclipse.platform.releng.aggregator/cje-production/dockerfiles') {
parallel(
'debian-swtnative-oldstable': { buildAndPushImage('debian/swtnative-oldstable', 'eclipse/platformreleng-debian-swtnativebuild:oldstable') },
'centos9-gtk4': { buildAndPushImage('centos-gtk4-mutter/9-gtk4', 'eclipse/platformreleng-centos-gtk4-mutter:9') },
'centos9-gtk4-swt': { buildAndPushImage('centos-gtk4-mutter/9-swtBuild', 'eclipse/platformreleng-centos-swt-build:9') },
'opensuse-gtk3': { buildAndPushImage('opensuse-gtk3-metacity/15-gtk3', 'eclipse/platformreleng-opensuse-gtk3-metacity:15') },
Expand Down
29 changes: 29 additions & 0 deletions cje-production/dockerfiles/debian/swtnative-oldstable/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM debian:oldstable

### user name recognition at runtime w/ an arbitrary uid - for OpenShift deployments
COPY scripts/uid_entrypoint /usr/local/bin/uid_entrypoint
RUN chmod u+x /usr/local/bin/uid_entrypoint && \
chgrp 0 /usr/local/bin/uid_entrypoint && \
chmod g=u /usr/local/bin/uid_entrypoint /etc/passwd
### end


ENV LANG=en_US.UTF-8
RUN apt-get update -qq && apt-get install -qq -y libgtk-3-dev freeglut3-dev webkit2gtk-driver build-essential default-jdk



ENV HOME=/home/swtbuild
ENV DISPLAY :0
RUN useradd -u 10001 -d ${HOME} testuser

RUN mkdir -p var/lib/dbus && dbus-uuidgen > /var/lib/dbus/machine-id \
&& mkdir -p /var/run/dbus

# Make $HOME open to the 'root' group (so Jenkins/OpenShift user can write there)
RUN chgrp -R 0 ${HOME} && chmod -R g=u ${HOME}

RUN localedef -i en_US -f UTF-8 en_US.UTF-8
ENV LANG=en_US.UTF-8

USER 10001
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env sh
if ! whoami > /dev/null 2>&1; then
if [ -w /etc/passwd ]; then
echo "${USER_NAME:-default}:x:$(id -u):0:${USER_NAME:-default} user:${HOME}:/sbin/nologin" >> /etc/passwd
fi
fi
exec "$@"

0 comments on commit 81d533c

Please sign in to comment.