Skip to content
Open
15 changes: 10 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
FROM ubuntu:22.04 AS skiplang-base

ARG TARGETARCH

ENV DEBIAN_FRONTEND=noninteractive
RUN --mount=type=bind,source=./bin/apt-install.sh,target=/tmp/apt-install.sh \
/tmp/apt-install.sh skiplang-build-deps && \
apt-get clean && rm -rf /var/lib/apt/lists/*
--mount=type=cache,id=apt-cache-$TARGETARCH,target=/var/cache/apt,sharing=locked \
--mount=type=cache,id=apt-lists-$TARGETARCH,target=/var/lib/apt/lists,sharing=locked \
/tmp/apt-install.sh skiplang-build-deps

ENV CC=clang
ENV CXX=clang++
Expand All @@ -24,6 +27,8 @@ FROM skiplang AS skip

RUN --mount=type=bind,source=./bin/apt-install.sh,target=/tmp/apt-install.sh \
--mount=type=bind,source=./requirements-dev.txt,target=/tmp/requirements-dev.txt \
/tmp/apt-install.sh skipruntime-deps other-CI-tools other-dev-tools && \
apt-get clean && rm -rf /var/lib/apt/lists/* && \
pip cache purge && npm cache clean --force
--mount=type=cache,id=apt-cache-$TARGETARCH,target=/var/cache/apt,sharing=locked \
--mount=type=cache,id=apt-lists-$TARGETARCH,target=/var/lib/apt/lists,sharing=locked \
--mount=type=cache,target=/root/.npm,sharing=locked \
--mount=type=cache,target=/root/.cache/pip,sharing=locked \
/tmp/apt-install.sh skipruntime-deps other-CI-tools other-dev-tools
10 changes: 6 additions & 4 deletions skiplang/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,21 @@
FROM debian:bookworm-20250113-slim AS base

ARG LLVM_VERSION=20
ARG TARGETARCH

# Install LLVM via apt repository directly
# Note: [trusted=yes] is needed because apt.llvm.org's GPG key uses SHA1 signatures
# which modern Debian rejects since Feb 2026. This is an upstream LLVM issue.
RUN apt-get update --quiet && \
apt-get install --quiet --yes make wget && \
RUN --mount=type=cache,id=apt-cache-$TARGETARCH,target=/var/cache/apt,sharing=locked \
--mount=type=cache,id=apt-lists-$TARGETARCH,target=/var/lib/apt/lists,sharing=locked \
apt-get update --quiet && \
apt-get install --quiet --yes --no-install-recommends ca-certificates make wget && \
echo "deb [trusted=yes] http://apt.llvm.org/bookworm/ llvm-toolchain-bookworm-${LLVM_VERSION} main" > /etc/apt/sources.list.d/llvm.list && \
apt-get update --quiet && \
apt-get install --quiet --yes \
apt-get install --quiet --yes --no-install-recommends \
clang-${LLVM_VERSION} \
llvm-${LLVM_VERSION} \
lld-${LLVM_VERSION} && \
apt-get clean && rm -rf /var/lib/apt/lists/* && \
update-alternatives \
--install /usr/bin/clang clang /usr/bin/clang-${LLVM_VERSION} 101 \
--slave /usr/bin/clang++ clang++ /usr/bin/clang++-${LLVM_VERSION} \
Expand Down
22 changes: 12 additions & 10 deletions skipruntime-ts/tests/native_addon/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
FROM ubuntu:latest

ARG TARGETARCH

# install dependencies needed to build the node addon
RUN apt-get update --quiet \
&& apt-get install --quiet --yes g++ make python3 wget \
RUN --mount=type=cache,id=apt-cache-$TARGETARCH,target=/var/cache/apt,sharing=locked \
--mount=type=cache,id=apt-lists-$TARGETARCH,target=/var/lib/apt/lists,sharing=locked \
--mount=type=cache,target=/root/.npm,sharing=locked \
apt-get update --quiet \
&& apt-get install --quiet --yes --no-install-recommends ca-certificates g++ make python3 wget \
&& wget --quiet --output-document=- https://deb.nodesource.com/setup_22.x | bash - \
&& apt-get install --quiet --yes nodejs \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& npm install --global typescript \
&& npm cache clean --force
&& apt-get install --quiet --yes --no-install-recommends nodejs \
&& npm install --global typescript

# copy the test code
COPY package.json test.ts /work/
Expand All @@ -29,9 +31,9 @@ RUN VERSION=$(npm install --dry-run @skipruntime/native | grep native | cut -d'
&& npm install @skipruntime/native

# build the test
RUN npm install \
&& tsc --module node16 test.ts \
&& npm cache clean --force
RUN --mount=type=cache,target=/root/.npm,sharing=locked \
npm install \
&& tsc --module node16 test.ts

# set LD_LIBRARY_PATH so node can find the native addon's shared object file
ENV LD_LIBRARY_PATH=${PREFIX}/lib
Expand Down
22 changes: 12 additions & 10 deletions skipruntime-ts/tests/native_addon_unreleased/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
FROM ubuntu:latest

ARG TARGETARCH

# install dependencies needed to build the node addon
RUN apt-get update --quiet \
&& apt-get install --quiet --yes g++ make python3 wget \
RUN --mount=type=cache,id=apt-cache-$TARGETARCH,target=/var/cache/apt,sharing=locked \
--mount=type=cache,id=apt-lists-$TARGETARCH,target=/var/lib/apt/lists,sharing=locked \
--mount=type=cache,target=/root/.npm,sharing=locked \
apt-get update --quiet \
&& apt-get install --quiet --yes --no-install-recommends ca-certificates g++ make python3 wget \
&& wget --quiet --output-document=- https://deb.nodesource.com/setup_22.x | bash - \
&& apt-get install --quiet --yes nodejs \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& npm install --global typescript \
&& npm cache clean --force
&& apt-get install --quiet --yes --no-install-recommends nodejs \
&& npm install --global typescript

# copy the npm pack archives, libskipruntime.so files, and install_runtime.sh
COPY build /work/build
Expand All @@ -34,9 +36,9 @@ RUN VERSION=$(npm install --dry-run @skipruntime/native | grep native | cut -d'
&& npm install @skipruntime/native

# build the test
RUN npm install \
&& tsc --module node16 test.ts \
&& npm cache clean --force
RUN --mount=type=cache,target=/root/.npm,sharing=locked \
npm install \
&& tsc --module node16 test.ts

# set LD_LIBRARY_PATH so node can find the native addon's shared object file
ENV LD_LIBRARY_PATH=${PREFIX}/lib
Expand Down
17 changes: 10 additions & 7 deletions sql/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
FROM skiplabs/skip AS base

RUN apt-get update && apt-get install -q -y curl sqlite3 unzip zip && \
ARG TARGETARCH

RUN --mount=type=cache,id=apt-cache-$TARGETARCH,target=/var/cache/apt,sharing=locked \
--mount=type=cache,id=apt-lists-$TARGETARCH,target=/var/lib/apt/lists,sharing=locked \
--mount=type=cache,target=/root/.npm,sharing=locked \
apt-get update && apt-get install -q -y --no-install-recommends curl sqlite3 unzip zip && \
npm install -g bun && \
npx playwright install-deps && \
apt-get clean && rm -rf /var/lib/apt/lists/* && \
npm cache clean --force
npx playwright install-deps

RUN sh -c 'curl -s "https://get.sdkman.io?rcupdate=false" | bash'
RUN bash -c "source $HOME/.sdkman/bin/sdkman-init.sh && \
RUN --mount=type=cache,id=sdkman-$TARGETARCH,target=/root/.sdkman/archives,sharing=locked \
bash -c "source $HOME/.sdkman/bin/sdkman-init.sh && \
sdk install gradle && \
sdk install java 20.0.2-tem && \
rm -rf $HOME/.sdkman/archives/*"
sdk install java 20.0.2-tem"

FROM base AS skdb

Expand Down
4 changes: 2 additions & 2 deletions sql/server/core/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ FROM eclipse-temurin:20

COPY . /skdb
WORKDIR /skdb/sql/server/core
RUN ../gradlew build --no-daemon --console plain && \
rm -rf ~/.gradle/caches ~/.gradle/wrapper
RUN --mount=type=cache,target=/root/.gradle,sharing=locked \
../gradlew build --no-daemon --console plain
3 changes: 2 additions & 1 deletion sql/server/dev/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ FROM eclipse-temurin:20 AS skgw
COPY . /skdb

WORKDIR /skdb/sql/server/dev
RUN ../gradlew jar --no-daemon --console plain
RUN --mount=type=cache,target=/root/.gradle,sharing=locked \
../gradlew jar --no-daemon --console plain

################################################################################
# Build the development image by copying out artifacts
Expand Down