chore(devcontainer): add devcontainer for clean builds (#2606)

chore(devcontainer): set up passwordless sudo for docker user for clean development and testing
This commit is contained in:
Jo
2025-04-30 23:08:02 +02:00
committed by GitHub
parent 2dcf94544c
commit 1982ce0366
2 changed files with 31 additions and 0 deletions

17
.devcontainer/Dockerfile Normal file
View File

@@ -0,0 +1,17 @@
# Use the jguer/yay-builder image as a parent image with archlinux
FROM docker.io/jguer/yay-builder
# Install extra packages (pacman-contrib and fish)
RUN sudo pacman -Syu --noconfirm pacman-contrib fish git-delta openssh bat go
# 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
USER docker
# Set the working directory
WORKDIR /workspace
# Command to run when starting the container
CMD ["bash"]

View File

@@ -0,0 +1,14 @@
{
"name": "Existing Dockerfile",
"build": {
"context": "..",
"dockerfile": "../.devcontainer/Dockerfile"
},
"customizations": {
"vscode": {
"extensions": [
"golang.go"
]
}
}
}