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

remove local build stanza and arm64 arch install ternary #19

Merged
merged 7 commits into from
Nov 15, 2023
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
63 changes: 0 additions & 63 deletions .devcontainer.json

This file was deleted.

1 change: 1 addition & 0 deletions .devcontainer.json
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
6 changes: 0 additions & 6 deletions devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
// - https://containers.dev/implementors/features
// - https://code.visualstudio.com/docs/getstarted/settings
{
// NOTE: remove `image` and uncomment `build` to build the image locally
//"build": {
// "dockerfile": "Dockerfile",
// "context": "."
//},
"name": "pulumi",
"image": "ghcr.io/pulumi/devcontainer",
"settings": {
Expand Down Expand Up @@ -38,7 +33,6 @@
"ms-python.python",
"jetpack-io.devbox",
"redhat.vscode-yaml",
"eg2.vscode-npm-script",
"esbenp.prettier-vscode",
"ms-vscode.makefile-tools",
"ms-azuretools.vscode-docker",
Expand Down
Loading