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
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ jobs:
working-directory: api/src
run: |
gcc -O2 -static -Wall -Wextra -Werror -o /tmp/spec-guard spec-guard.c
chmod 0555 /tmp/spec-guard
# Smoke: spec-guard must execvp its argument cleanly. Use a
# parent process with a known FD population so we also assert
# the close-inherited-FDs path runs (child must see only the
Expand Down
3 changes: 2 additions & 1 deletion api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ RUN git clone -b master --single-branch https://github.com/google/nsjail.git . \
RUN make -j$(nproc)

COPY api/src/spec-guard.c /tmp/spec-guard.c
# KVM/nsjail execution may need read permission on virtiofs-backed rootfs.
RUN gcc -O2 -static -o /usr/local/bin/spec-guard /tmp/spec-guard.c \
&& chmod 0111 /usr/local/bin/spec-guard
&& chmod 0555 /usr/local/bin/spec-guard

# ============================================================================
# Stage 1b: Build language runtime packages (only consumed by sandbox-runner-baked)
Expand Down
3 changes: 2 additions & 1 deletion docker/Dockerfile.worker-sandbox
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ RUN git clone -b master --single-branch https://github.com/google/nsjail.git . \
RUN make -j$(nproc)

COPY api/src/spec-guard.c /tmp/spec-guard.c
# KVM/nsjail execution may need read permission on virtiofs-backed rootfs.
RUN gcc -O2 -static -o /usr/local/bin/spec-guard /tmp/spec-guard.c \
&& chmod 0111 /usr/local/bin/spec-guard
&& chmod 0555 /usr/local/bin/spec-guard

# ============================================================================
# Stage 2: Build worker
Expand Down
3 changes: 2 additions & 1 deletion launcher/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ RUN git clone -b master --single-branch https://github.com/google/nsjail.git . \
RUN make -j$(nproc)

COPY api/src/spec-guard.c /tmp/spec-guard.c
# KVM/nsjail execution may need read permission on virtiofs-backed rootfs.
RUN gcc -O2 -static -o /usr/local/bin/spec-guard /tmp/spec-guard.c \
&& chmod 0111 /usr/local/bin/spec-guard
&& chmod 0555 /usr/local/bin/spec-guard

FROM oven/bun:1.3.14-debian AS sandbox-build

Expand Down