Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker: Add dockerbuild file for Ubuntu 22.04 #2768

Merged
merged 1 commit into from
Oct 7, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions ansible/docker/Dockerfile.Ubuntu2204
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
FROM ubuntu

ARG user=jenkins

ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get -y install git curl ansible

COPY . /ansible

RUN echo "localhost ansible_connection=local" > /ansible/hosts

RUN set -eux; \
cd /ansible; \
ansible-playbook -i hosts ansible/playbooks/AdoptOpenJDK_Unix_Playbook/main.yml --skip-tags="debug,hosts_file,hostname,adoptopenjdk,jenkins,nagios,superuser,docker,swap_file,crontab,nvidia_cuda_toolkit,ntp_time"

RUN rm -rf /ansible

RUN groupadd -g 1000 ${user}
RUN useradd -c "Jenkins user" -d /home/${user} -u 1000 -g 1000 -m ${user}
RUN mv /bin/uname /bin/uname.real && echo "/bin/uname.real \$@ | sed 's/aarch64/armv7l/g'" > /bin/uname && chmod 755 /bin/uname

ENV \
JDK7_BOOT_DIR="/usr/lib/jvm/jdk8" \
JDK8_BOOT_DIR="/usr/lib/jvm/jdk8" \
JDK10_BOOT_DIR="/usr/lib/jvm/jdk-10" \
JDK11_BOOT_DIR="/usr/lib/jvm/jdk-11" \
JDK13_BOOT_DIR="/usr/lib/jvm/jdk-13" \
JDK14_BOOT_DIR="/usr/lib/jvm/jdk-14" \
JDKLATEST_BOOT_DIR="/usr/lib/jvm/jdk-14" \
JAVA_HOME="/usr/lib/jvm/java-1.8.0-openjdk"