From 99f207af2f7358b5701b3a77037ee65b24bbf749 Mon Sep 17 00:00:00 2001 From: Toshihiko SHIMOKAWA Date: Mon, 11 May 2026 13:36:41 +0900 Subject: [PATCH 1/5] Update Java to 24.0.2 and Rust to 1.89.0 (#78) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Dockerfile / Dockerfile.lite: bump RUST_VERSION, JDK download URLs, and container-info.txt - toml/installscript.toml: Java display and download URL → 24.0.2 - toml/install-script.toml: Rust display, license URLs, and version references → 1.89.0; restore 1.87.0 entry in the version-history comment block - README.md / CLAUDE.md / IMAGE_SIZE_ANALYSIS.md: align documented Java/Rust versions - .github/workflows/pr-test.yml: update PR-build verification list JDK 24.0.2 URLs verified against https://jdk.java.net/archive/. Verified locally with atcoder-lite:2025 build: - openjdk 24.0.2 2025-07-15 - rustc 1.89.0 (29483883e 2025-08-04) --- .github/workflows/pr-test.yml | 4 ++-- CLAUDE.md | 4 ++-- Dockerfile | 8 ++++---- Dockerfile.lite | 8 ++++---- IMAGE_SIZE_ANALYSIS.md | 2 +- README.md | 4 ++-- toml/install-script.toml | 20 ++++++++++---------- toml/installscript.toml | 4 ++-- 8 files changed, 27 insertions(+), 27 deletions(-) diff --git a/.github/workflows/pr-test.yml b/.github/workflows/pr-test.yml index c5bede8..452c4e4 100644 --- a/.github/workflows/pr-test.yml +++ b/.github/workflows/pr-test.yml @@ -105,9 +105,9 @@ jobs: ### 🔍 Verified Components - ✅ Python 3.13.5 - ✅ Ruby 3.4.4 - - ✅ Rust 1.87.0 + - ✅ Rust 1.89.0 - ✅ Node.js 22.16.0 - - ✅ Java 23.0.1 + - ✅ Java 24.0.2 - ✅ GCC 13.3.0 🎯 **Ready for competitive programming!** diff --git a/CLAUDE.md b/CLAUDE.md index 1c1db0a..cbf4fe3 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -111,11 +111,11 @@ The container includes the following languages (versions as of January 2025): ### Full Version (Dockerfile) - **Python** 3.13.7 (with LTO and BOLT optimizations on x86_64) - **Node.js** 22.19.0 -- **Java** OpenJDK 23.0.1 +- **Java** OpenJDK 24.0.2 - **Ruby** 3.4.5 - **Erlang/OTP** 28.0.2 - **Elixir** 1.18.4 (using OTP 27 binary for OTP 28 compatibility) -- **Rust** 1.87.0 +- **Rust** 1.89.0 - **C++** GCC 13 (g++-13) on Ubuntu 24.04 - **PHP** 8.4.12 (with JIT compiler) diff --git a/Dockerfile b/Dockerfile index 4c42c27..9f1d164 100644 --- a/Dockerfile +++ b/Dockerfile @@ -178,7 +178,7 @@ RUN gem install -N \ sed -i 's/lib_helpers\\"/lib_helpers/g' "$(gem environment gemdir)/specifications/ac-library-rb-1.2.0.gemspec" # Install Rust from official precompiled tarball -ARG RUST_VERSION=1.87.0 +ARG RUST_VERSION=1.89.0 RUN case "$(uname -m)" in \ x86_64) \ curl "https://static.rust-lang.org/dist/rust-${RUST_VERSION}-x86_64-unknown-linux-gnu.tar.gz" -fO && \ @@ -419,11 +419,11 @@ RUN case "$(uname -m)" in \ # Install Java (precompiled) RUN case "$(uname -m)" in \ x86_64) \ - curl -L https://download.java.net/java/GA/jdk23.0.1/c28985cbf10d4e648e4004050f8781aa/11/GPL/openjdk-23.0.1_linux-x64_bin.tar.gz | \ + curl -L https://download.java.net/java/GA/jdk24.0.2/fdc5d0102fe0414db21410ad5834341f/12/GPL/openjdk-24.0.2_linux-x64_bin.tar.gz | \ tar zx -C /usr/local --strip-components 1 \ ;; \ aarch64) \ - curl -L https://download.java.net/java/GA/jdk23.0.1/c28985cbf10d4e648e4004050f8781aa/11/GPL/openjdk-23.0.1_linux-aarch64_bin.tar.gz | \ + curl -L https://download.java.net/java/GA/jdk24.0.2/fdc5d0102fe0414db21410ad5834341f/12/GPL/openjdk-24.0.2_linux-aarch64_bin.tar.gz | \ tar zx -C /usr/local --strip-components 1 \ ;; \ *) \ @@ -469,7 +469,7 @@ RUN apt-get update && \ RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 90 --slave /usr/bin/g++ g++ /usr/bin/g++-13 # Create info file -RUN echo 'AtCoder Full 2025: Py3.13.7 Node22.19 Java23.0.1 Ruby3.4.5 Erlang28.0.2 Elixir1.18.4 Rust1.87 C++GCC13 PHP8.4.12+JIT | ML: NumPy SciPy PyTorch pandas | C++: ACLib Boost1.83 Eigen LibTorch | or-tools' > /usr/local/share/container-info.txt && \ +RUN echo 'AtCoder Full 2025: Py3.13.7 Node22.19 Java24.0.2 Ruby3.4.5 Erlang28.0.2 Elixir1.18.4 Rust1.89 C++GCC13 PHP8.4.12+JIT | ML: NumPy SciPy PyTorch pandas | C++: ACLib Boost1.83 Eigen LibTorch | or-tools' > /usr/local/share/container-info.txt && \ echo "Built: $(date -u +"%Y-%m-%dT%H:%M:%SZ")" >> /usr/local/share/container-info.txt # Set final working directory diff --git a/Dockerfile.lite b/Dockerfile.lite index 2ab35a7..f0a6b76 100644 --- a/Dockerfile.lite +++ b/Dockerfile.lite @@ -134,7 +134,7 @@ RUN gem install -N \ sed -i 's/lib_helpers\\"/lib_helpers/g' "$(gem environment gemdir)/specifications/ac-library-rb-1.2.0.gemspec" # Install Rust from official precompiled tarball -ARG RUST_VERSION=1.87.0 +ARG RUST_VERSION=1.89.0 RUN case "$(uname -m)" in \ x86_64) \ curl "https://static.rust-lang.org/dist/rust-${RUST_VERSION}-x86_64-unknown-linux-gnu.tar.gz" -fO && \ @@ -299,11 +299,11 @@ RUN case "$(uname -m)" in \ # Install Java (precompiled) RUN case "$(uname -m)" in \ x86_64) \ - curl -L https://download.java.net/java/GA/jdk23.0.1/c28985cbf10d4e648e4004050f8781aa/11/GPL/openjdk-23.0.1_linux-x64_bin.tar.gz | \ + curl -L https://download.java.net/java/GA/jdk24.0.2/fdc5d0102fe0414db21410ad5834341f/12/GPL/openjdk-24.0.2_linux-x64_bin.tar.gz | \ tar zx -C /usr/local --strip-components 1 \ ;; \ aarch64) \ - curl -L https://download.java.net/java/GA/jdk23.0.1/c28985cbf10d4e648e4004050f8781aa/11/GPL/openjdk-23.0.1_linux-aarch64_bin.tar.gz | \ + curl -L https://download.java.net/java/GA/jdk24.0.2/fdc5d0102fe0414db21410ad5834341f/12/GPL/openjdk-24.0.2_linux-aarch64_bin.tar.gz | \ tar zx -C /usr/local --strip-components 1 \ ;; \ *) \ @@ -349,7 +349,7 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* # Create info file -RUN echo 'AtCoder Lite 2025: Py3.13.7 Node22.19 Java23.0.1 Ruby3.4.5 Erlang28.0.2 Elixir1.18.4 Rust1.87 C++GCC13 PHP8.4.12+JIT | C++: ACLib Eigen' > /usr/local/share/container-info.txt && \ +RUN echo 'AtCoder Lite 2025: Py3.13.7 Node22.19 Java24.0.2 Ruby3.4.5 Erlang28.0.2 Elixir1.18.4 Rust1.89 C++GCC13 PHP8.4.12+JIT | C++: ACLib Eigen' > /usr/local/share/container-info.txt && \ echo "Built: $(date -u +"%Y-%m-%dT%H:%M:%SZ")" >> /usr/local/share/container-info.txt # Set final working directory diff --git a/IMAGE_SIZE_ANALYSIS.md b/IMAGE_SIZE_ANALYSIS.md index 6485239..3848092 100644 --- a/IMAGE_SIZE_ANALYSIS.md +++ b/IMAGE_SIZE_ANALYSIS.md @@ -62,7 +62,7 @@ AtCoder コンテナの各バージョンにおける言語・コンポーネン - **Python**: 3.13.5(LTO/BOLT最適化) - **Node.js**: 22.16.0 - **Ruby**: 3.4.4(GCパッチ適用) -- **Java**: JDK 23.0.1 +- **Java**: JDK 24.0.2 - **Erlang**: 28.0 - **Elixir**: 1.18.4 - **Rust**: ❌ 除外 diff --git a/README.md b/README.md index 77602ab..b39dc9f 100644 --- a/README.md +++ b/README.md @@ -24,13 +24,13 @@ 両イメージとも以下の言語に対応しています: -- **Java** (JDK 23.0.1) +- **Java** (JDK 24.0.2) - **Ruby** (3.4.4 with GC patch) - **Elixir** (1.18.4) - **Python3** (3.13.5 with LTO/BOLT optimizations) - **JavaScript** (Node.js 22.16.0) - **C++** (g++ 12.3.0, C++23 support) -- **Rust** (1.70.0) +- **Rust** (1.89.0) - **Erlang** (28.0) ## 主要な違い diff --git a/toml/install-script.toml b/toml/install-script.toml index 4df1a8b..97b3f39 100644 --- a/toml/install-script.toml +++ b/toml/install-script.toml @@ -54,10 +54,10 @@ language = 'Rust' # 'C++23 (Clang 18.1.8)' # 'Java24 (OpenJDK 24.0.1)' # 'Python3 (CPython 3.13.3)' -display = 'Rust (rustc 1.87.0)' +display = 'Rust (rustc 1.89.0)' # 1.87.0: Released on: 15 May, 2025 https://releases.rs/docs/1.87.0/ -# 1.88.0: Will be stable on: 26 June, 2025 https://releases.rs/docs/1.88.0/ -# 1.89.0: Will be stable on: 7 August, 2025 https://releases.rs/docs/1.89.0/ +# 1.88.0: Released on: 26 June, 2025 https://releases.rs/docs/1.88.0/ +# 1.89.0: Released on: 7 August, 2025 https://releases.rs/docs/1.89.0/ # キー: license # 型: 配列 @@ -99,11 +99,11 @@ display = 'Rust (rustc 1.87.0)' # コンパイラ、インタプリタの実装のライセンスを記述してください # デュアルライセンスなど、ライセンスが複数ある場合はすべて記述してください license = [ - { name = 'Apache-2.0', url = 'https://github.com/rust-lang/rust/blob/1.87.0/COPYRIGHT' }, - { name = 'MIT', url = 'https://github.com/rust-lang/rust/blob/1.87.0/COPYRIGHT' }, - { name = 'Apache-2.0', exception = 'LLVM-exception', url = 'https://github.com/rust-lang/rust/blob/1.87.0/COPYRIGHT' }, - { name = 'Apache-2.0', url = 'https://github.com/rust-lang/rust/blob/1.87.0/LICENSE-APACHE' }, - { name = 'MIT', url = 'https://github.com/rust-lang/rust/blob/1.87.0/LICENSE-MIT' }, + { name = 'Apache-2.0', url = 'https://github.com/rust-lang/rust/blob/1.89.0/COPYRIGHT' }, + { name = 'MIT', url = 'https://github.com/rust-lang/rust/blob/1.89.0/COPYRIGHT' }, + { name = 'Apache-2.0', exception = 'LLVM-exception', url = 'https://github.com/rust-lang/rust/blob/1.89.0/COPYRIGHT' }, + { name = 'Apache-2.0', url = 'https://github.com/rust-lang/rust/blob/1.89.0/LICENSE-APACHE' }, + { name = 'MIT', url = 'https://github.com/rust-lang/rust/blob/1.89.0/LICENSE-MIT' }, ] # キー: library @@ -1679,8 +1679,8 @@ set -e sudo apt-get update sudo apt-get install -y --no-install-recommends build-essential ca-certificates curl -rust_version=1.87.0 -rust_channel=1.87.0 +rust_version=1.89.0 +rust_channel=1.89.0 # https://forge.rust-lang.org/infra/other-installation-methods.html#standalone-installers curl "https://static.rust-lang.org/dist/rust-$rust_channel-x86_64-unknown-linux-gnu.tar.gz" -fO --output-dir /tmp diff --git a/toml/installscript.toml b/toml/installscript.toml index 485cb36..5353fa1 100644 --- a/toml/installscript.toml +++ b/toml/installscript.toml @@ -2,7 +2,7 @@ language = 'Java' -display = 'Java24 (OpenJDK 24.0.1)' +display = 'Java24 (OpenJDK 24.0.2)' license = [ { name = 'GPL-2.0-or-later', url = 'https://openjdk.org/legal/gplv2+ce.html', exception = 'Classpath-exception-2.0' } @@ -15,7 +15,7 @@ library.ac-library-java = { license = [ filename = 'Main.java' install = ''' -curl https://download.java.net/java/GA/jdk24.0.1/24a58e0e276943138bf3e963e6291ac2/9/GPL/openjdk-24.0.1_linux-x64_bin.tar.gz | sudo tar zx -C /usr/local --strip-component 1 +curl https://download.java.net/java/GA/jdk24.0.2/fdc5d0102fe0414db21410ad5834341f/12/GPL/openjdk-24.0.2_linux-x64_bin.tar.gz | sudo tar zx -C /usr/local --strip-component 1 wget https://github.com/ocha98/ac-library-java/releases/download/v2.0.0/ac_library23.jar mv ac_library23.jar ac_library.jar cat << 'EOF' > java.sh From 65498b7332dbe8b3ca1741fdbda1656cb3216a78 Mon Sep 17 00:00:00 2001 From: Toshihiko SHIMOKAWA Date: Mon, 11 May 2026 14:00:03 +0900 Subject: [PATCH 2/5] Address Copilot review feedback (#78) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - toml/installscript.toml: --strip-component → --strip-components (GNU tar's canonical long option) - toml/install-script.toml: update Java display example to 24.0.2 - CLAUDE.md: drop the stale "as of January 2025" date; point readers to toml/*.toml and the Dockerfiles as the source of truth - IMAGE_SIZE_ANALYSIS.md: Rust is no longer excluded; sync version list with the Dockerfiles (Python 3.13.7, Node.js 22.19.0, etc.); drop the obsolete "GCパッチ適用" note for Ruby - README.md: sync remaining language versions (Ruby/Python/Node.js/ C++/Erlang) with the actual image versions - .github/workflows/pr-test.yml: sync the hardcoded "Verified Components" list with the Dockerfile versions --- .github/workflows/pr-test.yml | 8 ++++---- CLAUDE.md | 2 +- IMAGE_SIZE_ANALYSIS.md | 18 ++++++------------ README.md | 10 +++++----- toml/install-script.toml | 2 +- toml/installscript.toml | 2 +- 6 files changed, 18 insertions(+), 24 deletions(-) diff --git a/.github/workflows/pr-test.yml b/.github/workflows/pr-test.yml index 452c4e4..ec90c41 100644 --- a/.github/workflows/pr-test.yml +++ b/.github/workflows/pr-test.yml @@ -103,12 +103,12 @@ jobs: ⚡ **Build Type**: Lite version (competitive programming focused) ### 🔍 Verified Components - - ✅ Python 3.13.5 - - ✅ Ruby 3.4.4 + - ✅ Python 3.13.7 + - ✅ Ruby 3.4.5 - ✅ Rust 1.89.0 - - ✅ Node.js 22.16.0 + - ✅ Node.js 22.19.0 - ✅ Java 24.0.2 - - ✅ GCC 13.3.0 + - ✅ GCC 13 🎯 **Ready for competitive programming!** diff --git a/CLAUDE.md b/CLAUDE.md index cbf4fe3..ec62d67 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -106,7 +106,7 @@ git commit -m "Update competitive programming libraries [build-lite]" ## Supported Languages and Versions -The container includes the following languages (versions as of January 2025): +The container includes the following languages (see `toml/*.toml` and the Dockerfiles for authoritative versions): ### Full Version (Dockerfile) - **Python** 3.13.7 (with LTO and BOLT optimizations on x86_64) diff --git a/IMAGE_SIZE_ANALYSIS.md b/IMAGE_SIZE_ANALYSIS.md index 3848092..6ce7fd6 100644 --- a/IMAGE_SIZE_ANALYSIS.md +++ b/IMAGE_SIZE_ANALYSIS.md @@ -22,7 +22,7 @@ AtCoder コンテナの各バージョンにおける言語・コンポーネン | **Java** | 318MB | 136MB | 136MB | 0MB | | **Erlang** | 142MB | 163MB | 163MB | 0MB | | **Elixir** | 13MB | (含む) | (含む) | 0MB | -| **Rust** | 1.5GB | ❌ なし | ❌ なし | 0MB | +| **Rust** | 1.5GB | (含む) | (含む) | 0MB | | **LibTorch** | ❌ なし | ❌ なし | ~454MB | +454MB | | **PyTorch (Python)** | ❌ なし | ❌ なし | ~442MB | +442MB | | **システム(/usr)** | 576MB | 3.0GB | 4.4GB | +1.4GB | @@ -35,14 +35,9 @@ AtCoder コンテナの各バージョンにおける言語・コンポーネン - **フル版追加**: PyTorch 2.6.0+cpu(+738MB) ### Ruby の変化(112MB → 895MB) -- **GCパッチ適用**: 性能向上のためのパッチ - **gem ライブラリ**: 競技プログラミング用 + 科学計算系 - **フル版追加**: torch-rb 0.20.0(+36MB) -### Rust の除外(-1.5GB) -- 新バージョンでは Rust 1.70.0 を除外 -- サイズ削減の主要要因 - ### 機械学習ライブラリ(フル版のみ +896MB) - **LibTorch**: 454MB(C++ 機械学習ライブラリ) - **PyTorch**: 442MB(Python 機械学習フレームワーク) @@ -59,13 +54,13 @@ AtCoder コンテナの各バージョンにおける言語・コンポーネン - Rust: 1.70.0 ### 新バージョン(ライト版・フル版共通) -- **Python**: 3.13.5(LTO/BOLT最適化) -- **Node.js**: 22.16.0 -- **Ruby**: 3.4.4(GCパッチ適用) +- **Python**: 3.13.7(LTO/BOLT最適化) +- **Node.js**: 22.19.0 +- **Ruby**: 3.4.5 - **Java**: JDK 24.0.2 -- **Erlang**: 28.0 +- **Erlang**: 28.0.2 - **Elixir**: 1.18.4 -- **Rust**: ❌ 除外 +- **Rust**: 1.89.0 ## 推奨使用方法 @@ -87,7 +82,6 @@ AtCoder コンテナの各バージョンにおける言語・コンポーネン |------|--------|------| | **Python最適化ビルド** | +1.2GB | LTO、BOLT、科学計算ライブラリ | | **Ruby拡張** | +783MB | GCパッチ、競技プログラミング用gem | -| **Rust除外** | -1.5GB | サイズ削減効果 | | **機械学習ライブラリ** | +896MB | PyTorch、LibTorch(フル版のみ) | | **システム基盤** | +2.4GB | Ubuntu、ビルドツール、その他 | diff --git a/README.md b/README.md index b39dc9f..31824fd 100644 --- a/README.md +++ b/README.md @@ -25,13 +25,13 @@ 両イメージとも以下の言語に対応しています: - **Java** (JDK 24.0.2) -- **Ruby** (3.4.4 with GC patch) +- **Ruby** (3.4.5) - **Elixir** (1.18.4) -- **Python3** (3.13.5 with LTO/BOLT optimizations) -- **JavaScript** (Node.js 22.16.0) -- **C++** (g++ 12.3.0, C++23 support) +- **Python3** (3.13.7 with LTO/BOLT optimizations) +- **JavaScript** (Node.js 22.19.0) +- **C++** (g++ 13, C++23 support) - **Rust** (1.89.0) -- **Erlang** (28.0) +- **Erlang** (28.0.2) ## 主要な違い diff --git a/toml/install-script.toml b/toml/install-script.toml index 97b3f39..8ca628f 100644 --- a/toml/install-script.toml +++ b/toml/install-script.toml @@ -52,7 +52,7 @@ language = 'Rust' # 具体的には現状の提出画面における表示を参考にしてください # 例: 'C++23 (GCC 15.1)' # 'C++23 (Clang 18.1.8)' -# 'Java24 (OpenJDK 24.0.1)' +# 'Java24 (OpenJDK 24.0.2)' # 'Python3 (CPython 3.13.3)' display = 'Rust (rustc 1.89.0)' # 1.87.0: Released on: 15 May, 2025 https://releases.rs/docs/1.87.0/ diff --git a/toml/installscript.toml b/toml/installscript.toml index 5353fa1..31e302b 100644 --- a/toml/installscript.toml +++ b/toml/installscript.toml @@ -15,7 +15,7 @@ library.ac-library-java = { license = [ filename = 'Main.java' install = ''' -curl https://download.java.net/java/GA/jdk24.0.2/fdc5d0102fe0414db21410ad5834341f/12/GPL/openjdk-24.0.2_linux-x64_bin.tar.gz | sudo tar zx -C /usr/local --strip-component 1 +curl https://download.java.net/java/GA/jdk24.0.2/fdc5d0102fe0414db21410ad5834341f/12/GPL/openjdk-24.0.2_linux-x64_bin.tar.gz | sudo tar zx -C /usr/local --strip-components 1 wget https://github.com/ocha98/ac-library-java/releases/download/v2.0.0/ac_library23.jar mv ac_library23.jar ac_library.jar cat << 'EOF' > java.sh From 225871353fb8b6af30d022013761cd8897e15d0b Mon Sep 17 00:00:00 2001 From: Toshihiko SHIMOKAWA Date: Mon, 11 May 2026 14:21:44 +0900 Subject: [PATCH 3/5] Force CI build to verify Java/Rust version updates [build-all] (#78) The auto-skip detection script misclassifies Dockerfile/toml/yaml changes as documentation-only, so previous commits on this PR were skipped without building. This empty commit forces a [build-all] to verify the Java 24.0.2 / Rust 1.89.0 changes in CI. From 1dc7d1500af9e418962e9651c0ac8ca46f64fc20 Mon Sep 17 00:00:00 2001 From: Toshihiko SHIMOKAWA Date: Mon, 11 May 2026 18:31:52 +0900 Subject: [PATCH 4/5] Address second-round Copilot review feedback (#78) - CLAUDE.md: reword the Supported Languages intro so it matches the trailing Note that names toml/*.toml as the single source of truth (Dockerfiles are kept in sync, not co-authoritative) - toml/installscript.toml: add curl -fL flags to the JDK download so HTTP errors fail loudly and redirects are followed (consistent with the Dockerfile's curl -L invocation) --- CLAUDE.md | 2 +- toml/installscript.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index ec62d67..e737ec5 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -106,7 +106,7 @@ git commit -m "Update competitive programming libraries [build-lite]" ## Supported Languages and Versions -The container includes the following languages (see `toml/*.toml` and the Dockerfiles for authoritative versions): +The container includes the following languages (`toml/*.toml` is the single source of truth; the Dockerfiles are kept in sync with it): ### Full Version (Dockerfile) - **Python** 3.13.7 (with LTO and BOLT optimizations on x86_64) diff --git a/toml/installscript.toml b/toml/installscript.toml index 31e302b..e01036d 100644 --- a/toml/installscript.toml +++ b/toml/installscript.toml @@ -15,7 +15,7 @@ library.ac-library-java = { license = [ filename = 'Main.java' install = ''' -curl https://download.java.net/java/GA/jdk24.0.2/fdc5d0102fe0414db21410ad5834341f/12/GPL/openjdk-24.0.2_linux-x64_bin.tar.gz | sudo tar zx -C /usr/local --strip-components 1 +curl -fL https://download.java.net/java/GA/jdk24.0.2/fdc5d0102fe0414db21410ad5834341f/12/GPL/openjdk-24.0.2_linux-x64_bin.tar.gz | sudo tar zx -C /usr/local --strip-components 1 wget https://github.com/ocha98/ac-library-java/releases/download/v2.0.0/ac_library23.jar mv ac_library23.jar ac_library.jar cat << 'EOF' > java.sh From 885ae18802a663f43fb08a66492d2cc0501c886d Mon Sep 17 00:00:00 2001 From: Toshihiko SHIMOKAWA Date: Mon, 11 May 2026 19:18:14 +0900 Subject: [PATCH 5/5] Harden Java curl with -f flag in Dockerfiles (#78) Add -f to the JDK download in Dockerfile and Dockerfile.lite so HTTP 4xx/5xx errors fail fast (curl exit non-zero) instead of piping an error page into tar and surfacing as a confusing extraction failure. Matches the Rust download's curl -fO earlier in the same files. --- Dockerfile | 4 ++-- Dockerfile.lite | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9f1d164..e84738b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -419,11 +419,11 @@ RUN case "$(uname -m)" in \ # Install Java (precompiled) RUN case "$(uname -m)" in \ x86_64) \ - curl -L https://download.java.net/java/GA/jdk24.0.2/fdc5d0102fe0414db21410ad5834341f/12/GPL/openjdk-24.0.2_linux-x64_bin.tar.gz | \ + curl -fL https://download.java.net/java/GA/jdk24.0.2/fdc5d0102fe0414db21410ad5834341f/12/GPL/openjdk-24.0.2_linux-x64_bin.tar.gz | \ tar zx -C /usr/local --strip-components 1 \ ;; \ aarch64) \ - curl -L https://download.java.net/java/GA/jdk24.0.2/fdc5d0102fe0414db21410ad5834341f/12/GPL/openjdk-24.0.2_linux-aarch64_bin.tar.gz | \ + curl -fL https://download.java.net/java/GA/jdk24.0.2/fdc5d0102fe0414db21410ad5834341f/12/GPL/openjdk-24.0.2_linux-aarch64_bin.tar.gz | \ tar zx -C /usr/local --strip-components 1 \ ;; \ *) \ diff --git a/Dockerfile.lite b/Dockerfile.lite index f0a6b76..d2a53fd 100644 --- a/Dockerfile.lite +++ b/Dockerfile.lite @@ -299,11 +299,11 @@ RUN case "$(uname -m)" in \ # Install Java (precompiled) RUN case "$(uname -m)" in \ x86_64) \ - curl -L https://download.java.net/java/GA/jdk24.0.2/fdc5d0102fe0414db21410ad5834341f/12/GPL/openjdk-24.0.2_linux-x64_bin.tar.gz | \ + curl -fL https://download.java.net/java/GA/jdk24.0.2/fdc5d0102fe0414db21410ad5834341f/12/GPL/openjdk-24.0.2_linux-x64_bin.tar.gz | \ tar zx -C /usr/local --strip-components 1 \ ;; \ aarch64) \ - curl -L https://download.java.net/java/GA/jdk24.0.2/fdc5d0102fe0414db21410ad5834341f/12/GPL/openjdk-24.0.2_linux-aarch64_bin.tar.gz | \ + curl -fL https://download.java.net/java/GA/jdk24.0.2/fdc5d0102fe0414db21410ad5834341f/12/GPL/openjdk-24.0.2_linux-aarch64_bin.tar.gz | \ tar zx -C /usr/local --strip-components 1 \ ;; \ *) \