Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Add DevContainer Enviroment (VS Code) #810

Open
CodeMan99 opened this issue Dec 2, 2022 · 0 comments
Open

Feature: Add DevContainer Enviroment (VS Code) #810

CodeMan99 opened this issue Dec 2, 2022 · 0 comments
Assignees

Comments

@CodeMan99
Copy link

What problem does this feature solve?:

Ease of contributing. A fully configured IDE and tools as a single configuration file.

Provide an example:

I would like to suggest the following .devcontainer/devcontainer.json file.

// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/go
{
	"name": "CircleCI CLI - Dev",
	"image": "mcr.microsoft.com/devcontainers/go:0-1.18-bullseye",

	// Configure tool-specific properties.
	"customizations": {
		// Configure properties specific to VS Code.
		"vscode": {
			"extensions": [
				"circleci.circleci",
				"golang.Go",
				"mads-hartmann.bash-ide-vscode",
				"ms-vscode.PowerShell",
				"rebornix.Ruby"
			],
			// Set *default* container specific settings.json values on container create.
			"settings": {
				"go.toolsManagement.checkForUpdates": "local",
				"go.useLanguageServer": true,
				"go.gopath": "/go"
			}
		}
	},

	// Features to add to the dev container. More info: https://containers.dev/features.
	"features": {
		"ghcr.io/devcontainers/features/docker-from-docker:1": {
			"version": "20.10"
		},
		"ghcr.io/devcontainers/features/git:1": {},
		"ghcr.io/devcontainers/features/powershell:1": {},
		"ghcr.io/devcontainers/features/ruby:1": {},
		// supports bash-ide-vscode extension.
		"ghcr.io/lukewiwa/features/shellcheck:0": {}
	}

	// Use 'forwardPorts' to make a list of ports inside the container available locally.
	// "forwardPorts": [],

	// Use 'postCreateCommand' to run commands after the container is created.
	// "postCreateCommand": "go version",

	// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
	// "remoteUser": "root"
}

While this looks highly opinionated, I simply looked at the files in this repo and added any extension or devcontainer feature that made sense. I may have added unnecessary tools.

Usage Requirements

Install the following tools:

Then open the repository with code . and run the "Dev Containers: Rebuild and Reopen in Container" command.

More Resources

@abdelDriowya abdelDriowya self-assigned this Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants