Skip to content

Commit 9fb9b34

Browse files
authored
unixPB: Add AlmaLinux10 static dockerfile (#4045)
* unixPB: Add AlmaLinux10 static dockerfile Signed-off-by: Stewart X Addison <[email protected]> * Use fixed SHA to pull x86-64-v2 version Signed-off-by: Stewart X Addison <[email protected]> --------- Signed-off-by: Stewart X Addison <[email protected]>
1 parent 098f38d commit 9fb9b34

File tree

1 file changed

+51
-0
lines changed
  • ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/DockerStatic/Dockerfiles

1 file changed

+51
-0
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
FROM ghcr.io/almalinux/10-base:10.0-20250825@sha256:b59938ea3b263a747fa989622dd8bcba59f7cad9878be108c1de21e7db08daef
2+
# Using SHA because quay.io/almalinuxorg/10-base:10 might pull the x86-64-v3 version
3+
4+
ARG ant_version="1.10.15"
5+
ARG ant_512checksum="1de7facbc9874fa4e5a2f045d5c659f64e0b89318c1dbc8acc6aae4595c4ffaf90a7b1ffb57f958dd08d6e086d3fff07aa90e50c77342a0aa5c9b4c36bff03a9"
6+
7+
RUN dnf -y update && dnf install -y unzip zip epel-release openssl gpg
8+
9+
# Get latest jdk21 ga JRE
10+
RUN curl -sL -o /tmp/jdk21.sig `curl -s 'https://api.adoptium.net/v3/assets/feature_releases/21/ga?architecture=x64&heap_size=normal&image_type=jre&jvm_impl=hotspot&os=linux&page=0&page_size=1&project=jdk&vendor=eclipse' | grep signature_link | awk '{split($0,a,"\""); print a[4]}'`
11+
RUN gpg --keyserver keyserver.ubuntu.com --recv-keys 3B04D753C9050D9A5D343F39843C48A565F8F04B
12+
# Without this, building an EL10 container on podman will fail when it gets to the verify stage
13+
RUN rm -vf ~/.gnupg/public-keys.d/pubring.db.lock
14+
RUN mkdir -p /usr/lib/jvm/jdk21
15+
RUN curl -sL 'https://api.adoptium.net/v3/binary/latest/21/ga/linux/x64/jre/hotspot/normal/eclipse?project=jdk' | tee >(tar xpfz - -C /usr/lib/jvm/jdk21 --strip-components=1) | gpg --verify /tmp/jdk21.sig -
16+
# Install ant
17+
RUN curl -o /tmp/ant.zip 'https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.15-bin.zip' && \
18+
curl -Lo /tmp/ant-contrib.tgz https://sourceforge.net/projects/ant-contrib/files/ant-contrib/ant-contrib-1.0b2/ant-contrib-1.0b2-bin.tar.gz && \
19+
echo "$ant_512checksum /tmp/ant.zip" > /tmp/ant.sha512 && \
20+
echo "0fd2771dca2b8b014a4cb3246715b32e20ad5d26754186d82eee781507a183d5e63064890b95eb27c091c93c1209528a0b18a6d7e6901899319492a7610e74ad /tmp/ant-contrib.tgz" >> /tmp/ant.sha512 && \
21+
sha512sum --check --strict /tmp/ant.sha512 && \
22+
unzip -q -d /usr/local /tmp/ant.zip && \
23+
tar xpfz /tmp/ant-contrib.tgz -C /usr/local/apache-ant-$ant_version/lib --strip-components=2 ant-contrib/lib/ant-contrib.jar && \
24+
ln -s /usr/local/apache-ant-$ant_version/bin/ant /usr/bin/ant
25+
# Housekeep Downloaded Archives
26+
RUN rm /tmp/ant.zip /tmp/ant-contrib.tgz
27+
28+
# Set up jenkins user
29+
RUN useradd -m -d /home/jenkins jenkins && \
30+
mkdir /home/jenkins/.ssh && \
31+
mkdir /home/jenkins/.xdg-runtime && \
32+
echo "Jenkins_User_SSHKey" > /home/jenkins/.ssh/authorized_keys && \
33+
chown -R jenkins /home/jenkins/.ssh /home/jenkins/.xdg-runtime && \
34+
chmod -R og-rwx /home/jenkins/.ssh /home/jenkins/.xdg-runtime
35+
# Required for weston
36+
RUN su jenkins -c "mkdir -m 0755 /tmp/.X11-unix"
37+
38+
RUN dnf install -y perl
39+
# turbojpeg needed as prereq for weston but it's not the UBI CRB repo so pull from CS10 one
40+
RUN dnf install -y --enablerepo=crb turbojpeg
41+
RUN dnf install -y git make gcc weston xwayland-run libXrender libXi libXtst fontconfig fakeroot procps-ng hostname diffutils shared-mime-info
42+
RUN dnf install -y coreutils --allowerasing curl
43+
# Install SSL Test packages
44+
RUN dnf install -y gnutls gnutls-utils nss nss-tools
45+
RUN dnf install -y openssh-server
46+
RUN ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -P ""
47+
# RUN service ssh start
48+
CMD ["/usr/sbin/sshd","-D"]
49+
# ENTRYPOINT /bin/bash
50+
EXPOSE 22
51+
# Start with docker run -p 2222:22 UUID

0 commit comments

Comments
 (0)