From 5bf9d1b9da7359d3cc38ac123cfeb0629f215eca Mon Sep 17 00:00:00 2001 From: DanielHabenicht Date: Sun, 12 Nov 2023 02:48:54 +0100 Subject: [PATCH] chore(build): add devcontainer (#699) * chore: add devcontainer spec * add post create command * use golang base * add sign off workaround * automatically sign off * fix missing comma * fix unset of env vars * fix github envvars * automatically sign off --------- Signed-off-by: GitHub Signed-off-by: DanielHabenicht Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com> --- .devcontainer/devcontainer.json | 28 ++++++++++++++++++++++++++++ .vscode/settings.json | 3 +++ 2 files changed, 31 insertions(+) create mode 100644 .devcontainer/devcontainer.json create mode 100644 .vscode/settings.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000..a80af883 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,28 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/universal +{ + "name": "Default Linux Universal", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/go", + + // Features to add to the dev container. More info: https://containers.dev/features. + "features": { + "ghcr.io/devcontainers/features/terraform:1": {} + }, + + // Workaround for https://github.com/orgs/community/discussions/75161 + "postAttachCommand": "unset GIT_COMMITTER_NAME; unset GIT_COMMITTER_EMAIL;", + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Configure tool-specific properties. + // "customizations": {}, + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" + + + // Use 'postCreateCommand' to run commands after the container is created. + "postCreateCommand": "make build" +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..7feba4b7 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "git.alwaysSignOff": true +} \ No newline at end of file