Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Commit

Permalink
fix and activate nix + devbox in both architecture buildx builds (#18)
Browse files Browse the repository at this point in the history
* rm deprecated extension

* add symbolic link for codespaces

* fix qemu gha build failure

* fix qemu gha build failure

* fix qemu gha build failure

* fix qemu gha build failure
  • Loading branch information
usrbinkat authored Nov 14, 2023
1 parent 95a001f commit dafd71e
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ ENV TZ=UTC
ENV DEBIAN_FRONTEND=noninteractive
# Add go and nix to path
ENV PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/go/bin:/nix/var/nix/profiles/default/bin"
# Set necessary nix environment variable
ENV NIX_INSTALLER_EXTRA_CONF='filter-syscalls = false'
# Default to MS FROM image builtin user
USER vscode

Expand Down Expand Up @@ -101,11 +103,11 @@ RUN set -ex \
RUN set -ex \
&& export urlNix="https://install.determinate.systems/nix" \
&& export arch=$(uname -m | awk '{ if ($1 == "x86_64") print "amd64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }') \
&& [ ${arch} = "arm64" ] || curl --proto '=https' --tlsv1.2 -sSf -L ${urlNix} --output /tmp/install.sh \
&& [ ${arch} = "arm64" ] || chmod +x /tmp/install.sh \
&& [ ${arch} = "arm64" ] || /tmp/install.sh install linux --extra-conf "sandbox = false" --init none --no-confirm \
&& [ ${arch} = "arm64" ] || sh -c "nix --version" \
&& [ ${arch} = "arm64" ] || rm -rf /tmp/* \
&& curl --proto '=https' --tlsv1.2 -sSf -L ${urlNix} --output /tmp/install.sh \
&& chmod +x /tmp/install.sh \
&& /tmp/install.sh install linux --init none --extra-conf "filter-syscalls = false" --no-confirm \
&& sh -c "nix --version" \
&& rm -rf /tmp/* \
&& true

# Install devbox
Expand All @@ -114,11 +116,11 @@ RUN set -ex \
RUN set -ex \
&& export urlDevbox="https://get.jetpack.io/devbox" \
&& export arch=$(uname -m | awk '{ if ($1 == "x86_64") print "amd64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }') \
&& [ ${arch} = "arm64" ] || curl --proto '=https' --tlsv1.2 -sSf -L ${urlDevbox} --output /tmp/install.sh \
&& [ ${arch} = "arm64" ] || chmod +x /tmp/install.sh \
&& [ ${arch} = "arm64" ] || /tmp/install.sh -f \
&& [ ${arch} = "arm64" ] || devbox version \
&& [ ${arch} = "arm64" ] || rm -rf /tmp/* \
&& curl --proto '=https' --tlsv1.2 -sSf -L ${urlDevbox} --output /tmp/install.sh \
&& chmod +x /tmp/install.sh \
&& /tmp/install.sh -f \
&& devbox version \
&& rm -rf /tmp/* \
&& true

# Install golang
Expand Down

0 comments on commit dafd71e

Please sign in to comment.