File tree Expand file tree Collapse file tree 2 files changed +15
-4
lines changed
internal/devbox/generate/tmpl Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -7,20 +7,27 @@ ARG DEVBOX_USE_VERSION
77RUN apt-get update
88RUN apt-get -y install bash binutils git xz-utils wget sudo
99
10- # Step 1.5: Setting up devbox user
10+ # Step 2: Prepare for Nix
11+ ARG TARGETPLATFORM
12+ RUN mkdir -p /etc/nix/
13+ RUN if [ "$TARGETPLATFORM" = "linux/arm64" ] || [ "$TARGETPLATFORM" = "linux/arm64/v8" ]; then \
14+ echo "filter-syscalls = false" >> /etc/nix/nix.conf; \
15+ fi
16+
17+ # Step 3: Setting up devbox user
1118ENV DEVBOX_USER=devbox
1219RUN adduser $DEVBOX_USER
1320RUN usermod -aG sudo $DEVBOX_USER
1421RUN echo "devbox ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/$DEVBOX_USER
1522USER $DEVBOX_USER
1623
17- # Step 2 : Installing Nix
24+ # Step 4 : Installing Nix
1825RUN wget --output-document=/dev/stdout https://nixos.org/nix/install | sh -s -- --no-daemon
1926RUN . ~/.nix-profile/etc/profile.d/nix.sh
2027
2128ENV PATH="/home/${DEVBOX_USER}/.nix-profile/bin:$PATH"
2229
23- # Step 3 : Installing devbox
30+ # Step 5 : Installing devbox
2431ENV DEVBOX_USE_VERSION=$DEVBOX_USE_VERSION
2532RUN wget --quiet --output-document=/dev/stdout https://get.jetify.com/devbox | bash -s -- -f
2633RUN chown -R "${DEVBOX_USER}:${DEVBOX_USER}" /usr/local/bin/devbox
Original file line number Diff line number Diff line change @@ -8,8 +8,12 @@ RUN apt-get update
88RUN apt-get -y install bash binutils git xz-utils wget sudo
99
1010# Step 2: Installing Nix
11+ ARG TARGETPLATFORM
1112RUN mkdir -p /etc/nix/
12- RUN echo "filter-syscalls = false" >> /etc/nix/nix.conf && wget --output-document=/dev/stdout https://nixos.org/nix/install | sh -s -- --daemon
13+ RUN if [ "$TARGETPLATFORM" = "linux/arm64" ] || [ "$TARGETPLATFORM" = "linux/arm64/v8" ]; then \
14+ echo "filter-syscalls = false" >> /etc/nix/nix.conf; \
15+ fi
16+ RUN wget --output-document=/dev/stdout https://nixos.org/nix/install | sh -s -- --daemon
1317RUN . ~/.nix-profile/etc/profile.d/nix.sh
1418
1519ENV PATH="/root/.nix-profile/bin:$PATH"
You can’t perform that action at this time.
0 commit comments