-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Docker image to build natives with older dependencies
Prerequisite of eclipse-equinox/equinox#830
- Loading branch information
1 parent
23b2b66
commit 500f767
Showing
3 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
cje-production/dockerfiles/debian/swtgtk3nativebuild/Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
FROM debian:10 | ||
|
||
### 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 \ | ||
locales \ | ||
build-essential \ | ||
procps \ | ||
git \ | ||
libgtk-3-dev \ | ||
freeglut3-dev \ | ||
webkit2gtk-driver | ||
|
||
# There is purposefully no JDK in this image. If a particular build needs JDK it installs | ||
# it in the Jenkinsfile. | ||
|
||
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) | ||
WORKDIR $HOME | ||
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 |
7 changes: 7 additions & 0 deletions
7
cje-production/dockerfiles/debian/swtgtk3nativebuild/scripts/uid_entrypoint
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 "$@" |