diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000000..4f6cbcbf93 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,14 @@ + +FROM mcr.microsoft.com/devcontainers/universal:2 as go_builder +RUN GOBIN=/usr/local/bin go install github.com/rogpeppe/go-internal/cmd/testscript@latest +RUN GOBIN=/usr/local/bin go install github.com/go-task/task/v3/cmd/task@latest +RUN GOBIN=/usr/local/bin go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest + +FROM mcr.microsoft.com/devcontainers/universal:2 +ENV DEBIAN_FRONTEND=noninteractive +RUN set -eux; \ + wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq; \ + chmod +x /usr/bin/yq; +COPY --from=go_builder /usr/local/bin/testscript /usr/local/bin/testscript +COPY --from=go_builder /usr/local/bin/task /usr/local/bin/task +COPY --from=go_builder /usr/local/bin/golangci-lint /usr/local/bin/golangci-lint diff --git a/.devcontainer/devcontainer.env b/.devcontainer/devcontainer.env new file mode 100644 index 0000000000..59ec443639 --- /dev/null +++ b/.devcontainer/devcontainer.env @@ -0,0 +1 @@ +TASK_X_REMOTE_TASKFILES=0 diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000000..23ae620e1c --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,25 @@ +{ + "build": { + "dockerfile": "Dockerfile", + "context": ".." + }, + "customizations": { + "vscode": { + "extensions": [ + "editorconfig.editorconfig", + "golang.go", + "redhat.vscode-yaml", + "streetsidesoftware.code-spell-checker", + "task.vscode-task" + ] + } + }, + "features": {}, + "runArgs": [ + "--env-file", ".devcontainer/devcontainer.env" + ], + "onCreateCommand": [], + "postCreateCommand": [], + "forwardPorts": [], + "portsAttributes": {} +}