Skip to content

[docker image] set filter-syscalls = false in nix.conf to workaround missing seccomp BPF program in arm64 linux #2665

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 5, 2025
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
13 changes: 10 additions & 3 deletions internal/devbox/generate/tmpl/DevboxImageDockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,27 @@ ARG DEVBOX_USE_VERSION
RUN apt-get update
RUN apt-get -y install bash binutils git xz-utils wget sudo

# Step 1.5: Setting up devbox user
# Step 2: Prepare for Nix
ARG TARGETPLATFORM
RUN mkdir -p /etc/nix/
RUN if [ "$TARGETPLATFORM" = "linux/arm64" ] || [ "$TARGETPLATFORM" = "linux/arm64/v8" ]; then \
echo "filter-syscalls = false" >> /etc/nix/nix.conf; \
fi

# Step 3: Setting up devbox user
ENV DEVBOX_USER=devbox
RUN adduser $DEVBOX_USER
RUN usermod -aG sudo $DEVBOX_USER
RUN echo "devbox ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/$DEVBOX_USER
USER $DEVBOX_USER

# Step 2: Installing Nix
# Step 4: Installing Nix
RUN wget --output-document=/dev/stdout https://nixos.org/nix/install | sh -s -- --no-daemon
RUN . ~/.nix-profile/etc/profile.d/nix.sh

ENV PATH="/home/${DEVBOX_USER}/.nix-profile/bin:$PATH"

# Step 3: Installing devbox
# Step 5: Installing devbox
ENV DEVBOX_USE_VERSION=$DEVBOX_USE_VERSION
RUN wget --quiet --output-document=/dev/stdout https://get.jetify.com/devbox | bash -s -- -f
RUN chown -R "${DEVBOX_USER}:${DEVBOX_USER}" /usr/local/bin/devbox
Expand Down
6 changes: 5 additions & 1 deletion internal/devbox/generate/tmpl/DevboxImageDockerfileRootUser
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@ RUN apt-get update
RUN apt-get -y install bash binutils git xz-utils wget sudo

# Step 2: Installing Nix
ARG TARGETPLATFORM
RUN mkdir -p /etc/nix/
RUN echo "filter-syscalls = false" >> /etc/nix/nix.conf && wget --output-document=/dev/stdout https://nixos.org/nix/install | sh -s -- --daemon
RUN if [ "$TARGETPLATFORM" = "linux/arm64" ] || [ "$TARGETPLATFORM" = "linux/arm64/v8" ]; then \
echo "filter-syscalls = false" >> /etc/nix/nix.conf; \
fi
RUN wget --output-document=/dev/stdout https://nixos.org/nix/install | sh -s -- --daemon
RUN . ~/.nix-profile/etc/profile.d/nix.sh

ENV PATH="/root/.nix-profile/bin:$PATH"
Expand Down
Loading