|
1 | 1 | ARG BUN_VERSION=1.3.9 |
2 | | - |
3 | | -FROM oven/bun:${BUN_VERSION}-alpine |
4 | | - |
5 | 2 | ARG HUGO_VERSION=0.155.3 |
6 | 3 | ARG RALPHEX_VERSION=0.11.0 |
7 | 4 |
|
| 5 | +# Extend the ralphex base image which provides the ralphex binary at /srv/ralphex |
| 6 | +# along with Claude Code, Codex, Node.js, git, ripgrep, and other development tools |
| 7 | +FROM ghcr.io/umputun/ralphex:${RALPHEX_VERSION} |
| 8 | + |
| 9 | +ARG BUN_VERSION |
| 10 | +ARG HUGO_VERSION |
| 11 | + |
8 | 12 | # Platform architecture (automatically set by Docker based on build platform) |
9 | 13 | ARG TARGETARCH |
10 | 14 |
|
11 | 15 | # Install dependencies: |
12 | 16 | # - ca-certificates: Required for HTTPS connections |
| 17 | +# - curl: Required by Bun install script |
13 | 18 | # - gcompat: glibc compatibility layer required for Hugo Extended binary (Alpine uses musl) |
14 | 19 | # - go: Required for Hugo Modules to download and manage dependencies (e.g., PaperMod theme) |
15 | | -# - wget: Required to download Hugo and Ralphex binaries |
16 | | -RUN apk add --no-cache ca-certificates gcompat go wget |
| 20 | +# - unzip: Required by Bun install script on Linux |
| 21 | +# - wget: Required to download Hugo Extended binary |
| 22 | +RUN apk add --no-cache ca-certificates curl gcompat go unzip wget |
17 | 23 |
|
18 | | -# Install Ralphex by downloading pre-built binary with checksum verification |
19 | | -RUN set -eux; \ |
20 | | - wget -O ralphex.tar.gz "https://github.com/umputun/ralphex/releases/download/v${RALPHEX_VERSION}/ralphex_${RALPHEX_VERSION}_linux_${TARGETARCH}.tar.gz"; \ |
21 | | - wget -O ralphex_checksums.txt "https://github.com/umputun/ralphex/releases/download/v${RALPHEX_VERSION}/ralphex_${RALPHEX_VERSION}_checksums.txt"; \ |
22 | | - EXPECTED_CHECKSUM=$(grep "ralphex_${RALPHEX_VERSION}_linux_${TARGETARCH}.tar.gz" ralphex_checksums.txt | cut -d' ' -f1); \ |
23 | | - if [ -z "$EXPECTED_CHECKSUM" ]; then \ |
24 | | - echo "Error: Could not find checksum for ralphex_${RALPHEX_VERSION}_linux_${TARGETARCH}.tar.gz"; \ |
25 | | - exit 1; \ |
26 | | - fi; \ |
27 | | - ACTUAL_CHECKSUM=$(sha256sum ralphex.tar.gz | cut -d' ' -f1); \ |
28 | | - if [ "$EXPECTED_CHECKSUM" != "$ACTUAL_CHECKSUM" ]; then \ |
29 | | - echo "Checksum verification failed for Ralphex!"; \ |
30 | | - echo "Expected: $EXPECTED_CHECKSUM"; \ |
31 | | - echo "Actual: $ACTUAL_CHECKSUM"; \ |
32 | | - exit 1; \ |
33 | | - fi; \ |
34 | | - echo "Ralphex checksum verified: $ACTUAL_CHECKSUM"; \ |
35 | | - tar -xzf ralphex.tar.gz -C /usr/local/bin/ ralphex; \ |
36 | | - rm ralphex.tar.gz ralphex_checksums.txt; \ |
37 | | - ralphex --version |
| 24 | +# Install Bun using official install script |
| 25 | +# BUN_INSTALL sets the installation directory |
| 26 | +ENV BUN_INSTALL=/usr/local/bun |
| 27 | +ENV PATH="$BUN_INSTALL/bin:$PATH" |
| 28 | + |
| 29 | +RUN curl -fsSL https://bun.sh/install | bash -s "bun-v${BUN_VERSION}" && \ |
| 30 | + bun --version |
38 | 31 |
|
39 | 32 | # Install Hugo Extended by downloading pre-built binary with checksum verification |
40 | 33 | RUN set -eux; \ |
|
0 commit comments