Add devcontainer#13
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds development container configuration to enable consistent development environments using VS Code's devcontainer feature. The configuration sets up an Arch Linux-based container with Go development tools and utilities.
- Adds devcontainer.json configuration pointing to a custom Dockerfile
- Creates a Dockerfile based on jguer/yay-builder with additional development tools (pacman-contrib, fish, git-delta, openssh, bat, go, github-cli)
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| .devcontainer/devcontainer.json | Defines the devcontainer configuration with workspace settings, Docker build context, and VS Code extensions (golang.go) |
| .devcontainer/Dockerfile | Creates development container image with Go tooling, passwordless sudo for docker user, and necessary development utilities |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Set passwordless sudo for the docker user | ||
| RUN echo "docker ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/docker |
There was a problem hiding this comment.
The sudo configuration writes directly to /etc/sudoers.d/docker without using visudo or proper permissions. This could be a security risk. The file should have appropriate permissions (0440) to prevent unauthorized modifications. Consider using RUN echo "docker ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/docker && sudo chmod 0440 /etc/sudoers.d/docker
| # Set passwordless sudo for the docker user | |
| RUN echo "docker ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/docker | |
| # Set passwordless sudo for the docker user with secure permissions on the sudoers file | |
| RUN echo "docker ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/docker >/dev/null && sudo chmod 0440 /etc/sudoers.d/docker |
| # Set passwordless sudo for the docker user | ||
| RUN echo "docker ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/docker | ||
|
|
||
| # Create a non-root user and switch to it |
There was a problem hiding this comment.
The comment says "Create a non-root user and switch to it" but the user 'docker' is already created by the parent image (jguer/yay-builder). This comment is misleading as it only switches to the existing user. Consider updating it to "Switch to the docker user" for accuracy.
| # Create a non-root user and switch to it | |
| # Switch to the docker user |
No description provided.