Skip to content

Building OpenJDK using temurin build scripts within the adopt build docker container

Andrew Leonard edited this page Mar 11, 2022 · 13 revisions
  1. Pull the build docker image for your environment:

For a x64 architecture use docker image: docker pull adoptopenjdk/centos6_build_image

For a arm64 architecture use docker image: docker pull adoptopenjdk/centos7_build_image

  1. Create a local workspace to build in:

mkdir workspace

  1. Start docker container, substitute full path to workspace:

docker run -it -w /..path../workspace -v /..path../workspace:/..path../workspace <image> bash

Note: If you have SELinux enabled (check with sestatus), then use -v /..path../workspace:/..path../workspace:z

  1. git clone https://github.com/adoptium/temurin-build.git
  2. cd temurin-build
  3. Set the following environment variables, put into a script and source to make easier: ` export ARCHITECTURE=x64

export TARGET_OS=linux

export VARIANT=temurin

export JAVA_TO_BUILD=jdk17u

#export BUILD_ARGS= for any build args

#export CONFIGURE_ARGS= for any openjdk configure args `

  1. Perform build with command: build-farm/make-adopt-build-farm.sh