Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion packages/containers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Images

- `base`: Ubuntu 24.04 with common build tools and utilities
- `bun-node`: `base` plus Bun and Node.js 24
- `jetbrains`: `bun-node` plus Java 21 and the pre-cached Gradle distribution
- `jetbrains`: `bun-node` plus Java 21, JBR font libraries, and pre-cached Gradle and Bun packages <!-- kilocode_change -->
- `rust`: `bun-node` plus Rust (stable, minimal profile)
- `tauri-linux`: `rust` plus Tauri Linux build dependencies
- `publish`: `bun-node` plus Docker CLI and AUR tooling
Expand Down
25 changes: 21 additions & 4 deletions packages/containers/jetbrains/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
# kilocode_change start
ARG REGISTRY=ghcr.io/kilo-org
FROM ${REGISTRY}/build/bun-node:24.04
FROM ${REGISTRY}/build/bun-node:24.04 AS runtime

ARG DEBIAN_FRONTEND=noninteractive
ARG GRADLE_VERSION=9.4.1

# Install Java 21 (apt handles multi-arch automatically)
# Install Java 21 and the font stack required by JBR headless tests
RUN apt-get update \
&& apt-get install -y --no-install-recommends openjdk-21-jdk-headless \
&& apt-get install -y --no-install-recommends \
fonts-dejavu-core \
libfontconfig1 \
libfreetype6 \
openjdk-21-jdk-headless \
&& rm -rf /var/lib/apt/lists/*

# Create a stable /usr/lib/jvm/java-21 symlink that works on amd64 and arm64
Expand All @@ -23,7 +27,7 @@ ENV GRADLE_USER_HOME=/gradle-home

RUN set -euo pipefail; \
url="https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip"; \
hash=$(echo -n "${url}" | md5sum | cut -d' ' -f1); \
hash=$(node -e 'const crypto = require("node:crypto"); const hex = crypto.createHash("md5").update(process.argv[1]).digest("hex"); console.log(BigInt(`0x${hex}`).toString(36))' "${url}"); \
dir="/gradle-home/wrapper/dists/gradle-${GRADLE_VERSION}-bin/${hash}"; \
mkdir -p "${dir}"; \
curl -fsSL "${url}" -o "${dir}/gradle-${GRADLE_VERSION}-bin.zip"; \
Expand All @@ -32,4 +36,17 @@ RUN set -euo pipefail; \
rm "${dir}/gradle-${GRADLE_VERSION}-bin.zip"; \
java -version; \
"${dir}/gradle-${GRADLE_VERSION}/bin/gradle" --version

FROM ${REGISTRY}/build/bun-node:24.04 AS bun-cache

WORKDIR /src
COPY package.json bun.lock bunfig.toml ./
COPY packages ./packages
COPY patches ./patches
RUN bun install --frozen-lockfile --ignore-scripts --cache-dir=/bun-cache

FROM runtime

ENV BUN_INSTALL_CACHE_DIR=/opt/bun/install/cache
COPY --from=bun-cache /bun-cache/ /opt/bun/install/cache/
# kilocode_change end
Loading