Compare commits

...

8 commits

Author SHA1 Message Date
1cec87ce45
fix: do not fail if no volume provided
All checks were successful
Docker Image CI / build-and-push (map[build-args:[] context:./ dockerfile:Dockerfile.piped image_name:piped]) (push) Successful in 9s
Docker Image CI / build-and-push (map[build-args:[] context:./ dockerfile:Dockerfile.openj9 image_name:openj9]) (push) Successful in 8m46s
2025-03-14 18:26:34 +04:00
1bcc578fa1
chore: cleanup action yml 2025-03-14 18:25:33 +04:00
83b5771fdf
fix(deps): return zip&unzip 2025-03-14 18:06:00 +04:00
415afaee09
fix: apt-get, no readline 2025-03-14 17:59:11 +04:00
3f75cded58
perf: add -O3 and lto 2025-03-14 17:56:00 +04:00
95b6822a44
style: remove extra WORKDIR 2025-03-14 17:37:55 +04:00
0a63082d3b
feat: replace custom bootjdk with ubuntu package 2025-03-14 17:32:06 +04:00
04c4e3fece
fix: switch back to gcc 2025-03-14 17:21:15 +04:00
2 changed files with 23 additions and 32 deletions

View file

@ -2,11 +2,10 @@ name: Docker Image CI
on:
push:
pull_request:
env:
REGISTRY: git.dc09.ru # Change to your registry (e.g., forgejo.example.com)
REGISTRY: git.dc09.ru
GITHUB_TOKEN: ${{ secrets.FORGEJO_PASSWORD }}
GITHUB_API_URL: https://git.dc09.ru
GITHUB_BASE_REF: git.dc09.ru
@ -24,7 +23,7 @@ jobs:
- dockerfile: 'Dockerfile.openj9'
image_name: 'openj9'
context: './'
build-args: ["WITH_JDK=false"]
build-args: []
- dockerfile: 'Dockerfile.piped'
image_name: 'piped'
context: './'
@ -60,7 +59,6 @@ jobs:
github-token: ${{ secrets.FORGEJO_PASSWORD }}
github-server: https://git.dc09.ru
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
@ -69,4 +67,4 @@ jobs:
push: ${{ github.event_name == 'push' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: ${{ matrix.images.build-args }}
build-args: ${{ matrix.images.build-args }}

View file

@ -2,23 +2,19 @@ FROM ubuntu:25.04 AS build
# partially copied from mkdocker.sh
# Copyright IBM Corp (Eclipse Public License 2.0)
RUN apt -qq update \
&& apt -qq upgrade -y \
&& apt -qq install -y --no-install-recommends \
ant ant-contrib autoconf build-essential ca-certificates clang cmake cpio curl execstack file git \
libasound2-dev libcups2-dev libdwarf-dev libelf-dev libexpat1-dev libffi-dev libfontconfig libfontconfig1-dev \
libfreetype6-dev libnuma-dev libssl-dev libx11-dev libxext-dev libxrandr-dev libxrender-dev libxt-dev libxtst-dev \
llvm-dev lld make nasm pkg-config python3 python3-dev rsync systemtap-sdt-dev unzip wget xvfb zip zlib1g-dev unzip \
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -qq update \
&& apt-get -qq upgrade -y \
&& apt-get -qq install -y --no-install-recommends \
ant ant-contrib autoconf ca-certificates cmake cpio file gcc g++ git \
libasound2-dev libcups2-dev libdwarf-dev libelf-dev libexpat1-dev libffi-dev \
libfontconfig libfontconfig1-dev libfreetype6-dev libnuma-dev libssl-dev \
libx11-dev libxext-dev libxrandr-dev libxrender-dev libxt-dev libxtst-dev \
make nasm openjdk-21-jdk-headless pkg-config python3 python3-dev rsync \
systemtap-sdt-dev unzip xvfb zip zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /build
RUN mkdir /build/bootjdk /build/dist \
&& wget --progress=dot:mega -O jdk21.tar.gz \
https://api.adoptopenjdk.net/v3/binary/latest/21/ga/linux/x64/jdk/openj9/normal/adoptopenjdk \
&& tar -xzf jdk21.tar.gz --directory=/build/bootjdk --strip-components=1 \
&& rm -f jdk21.tar.gz
RUN find /build/bootjdk -name '*.so' -type f -print0 | xargs -0 -- execstack -c
RUN git clone --single-branch --depth 1 \
https://github.com/ibmruntimes/openj9-openjdk-jdk21.git \
@ -27,22 +23,20 @@ RUN git clone --single-branch --depth 1 \
WORKDIR /build/src
RUN bash get_source.sh
ENV CC=/usr/bin/clang CXX=/usr/bin/clang++ LD=/usr/bin/lld
# TODO: add as args to configure
# CFLAGS="-O3 -flto -fwhole-program-vtables" \
# LDFLAGS="-Wl,-O1"
ENV CFLAGS="-Wno-error=nontrivial-memcall"
ENV CC=/usr/bin/gcc CXX=/usr/bin/g++
RUN bash configure \
--with-boot-jdk=/build/bootjdk \
--with-boot-jdk=/usr/lib/jvm/java-21-openjdk-amd64 \
--with-openssl=system \
--with-toolchain-type=clang \
--enable-jvm-feature-link-time-opt \
--with-extra-cflags="$CFLAGS" \
--with-extra-cxxflags="$CFLAGS"
--with-extra-cflags="-O3 -flto=auto -fuse-linker-plugin" \
--with-extra-cxxflags="-O3 -flto=auto -fuse-linker-plugin" \
--with-extra-ldflags="-Wl,-O1" \
--with-native-debug-symbols=none \
--enable-jvm-feature-link-time-opt
RUN make all JOBS=$(nproc)
# jlink by advice from https://adoptium.net/blog/2021/10/jlink-to-produce-own-runtime/
WORKDIR /build/src/build/linux-x86_64-server-release/images
# jlink by advice from https://adoptium.net/blog/2021/10/jlink-to-produce-own-runtime/
RUN jdk/bin/jlink --strip-debug --no-man-pages --no-header-files --compress=2 \
--output jre \
--add-modules java.base,java.compiler,java.datatransfer,java.desktop,java.instrument,java.logging,\
@ -54,8 +48,7 @@ jdk.nio.mapmode,jdk.random,jdk.sctp,jdk.security.auth,jdk.security.jgss,jdk.unsu
jdk.xml.dom,jdk.zipfs,openj9.criu,openj9.cuda,openj9.dataaccess,openj9.gpu,openj9.jvm,\
openj9.sharedclasses,openj9.zosconditionhandling
WORKDIR /build/src/build/linux-x86_64-server-release/images
RUN mv ./* /build/dist/
RUN mkdir -p /build/dist && mv ./* /build/dist/
# ------