diff --git a/.devcontainer.json b/.devcontainer.json deleted file mode 100644 index 2cf9a55..0000000 --- a/.devcontainer.json +++ /dev/null @@ -1,63 +0,0 @@ -// Reference: -// - https://containers.dev/features -// - 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": { - "terminal.integrated.shell.linux": "/usr/bin/zsh" - }, - "customizations": { - "vscode": { - "settings": [ - "go.testTags", "all", - "go.buildTags", "all", - "editor.minimap.enabled", false, - "explorer.openEditors.visible", 1, - "editor.quickSuggestionsDelay", 0, - "editor.suggestSelection", "first", - "editor.snippetSuggestions", "top", - "editor.gotoLocation.multipleReferences", "goto", - "editor.gotoLocation.multipleDefinitions", "goto", - "editor.gotoLocation.multipleDeclarations", "goto", - "editor.gotoLocation.multipleImplementations", "goto", - "editor.gotoLocation.multipleTypeDefinitions", "goto", - "files.trimTrailingWhitespace", true, - "files.trimFinalNewlines", true - ], - "extensions": [ - "golang.go", - "vscodevim.vim", - "github.copilot", - "ms-python.python", - "jetpack-io.devbox", - "redhat.vscode-yaml", - "eg2.vscode-npm-script", - "esbenp.prettier-vscode", - "ms-vscode.makefile-tools", - "ms-azuretools.vscode-docker", - "github.vscode-pull-request-github", - "ms-vscode-remote.remote-containers", - "visualstudioexptteam.vscodeintellicode", - "bierner.markdown-preview-github-styles" - ] - } - }, - "features": { - "ghcr.io/devcontainers/features/common-utils:2": {}, - "ghcr.io/devcontainers/features/docker-outside-of-docker:1": { - "version": "latest", - "installDockerBuildx": true, - "moby": false - } - }, - "postCreateCommand": "git submodule update --init --recursive", - "remoteUser": "vscode", - "runArgs": ["--network=host"] -} diff --git a/.devcontainer.json b/.devcontainer.json new file mode 120000 index 0000000..62b9558 --- /dev/null +++ b/.devcontainer.json @@ -0,0 +1 @@ +devcontainer.json \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 14a4f59..94cc412 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 @@ -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 @@ -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 diff --git a/devcontainer.json b/devcontainer.json index 2cf9a55..2d4948a 100644 --- a/devcontainer.json +++ b/devcontainer.json @@ -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": { @@ -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",