From 40098ffb862c2eb5ce2b7c2ad05022d2658244dc Mon Sep 17 00:00:00 2001 From: Matt Farina Date: Wed, 3 Dec 2025 14:12:05 -0500 Subject: [PATCH 1/2] Updating the devcontainer to include copilot Signed-off-by: Matt Farina --- .devcontainer/Dockerfile | 53 ++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 1e559fe..034cc6e 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,39 +1,38 @@ -# Use SUSE BCI Golang as the base image -FROM registry.suse.com/bci/golang:1.25 +# Use the official Go + Node.js devcontainer base image +FROM mcr.microsoft.com/devcontainers/go:1.25 + +# Install Node.js +RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \ + apt-get install -y nodejs && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* # Install VCS tools and other dependencies -RUN zypper --non-interactive refresh && \ - zypper --non-interactive install -y \ +RUN apt-get update && \ + apt-get install -y \ git \ mercurial \ subversion \ bzr \ make \ curl \ - sudo \ - shadow && \ - zypper clean --all - -# Create a non-root user for development -ARG USERNAME=vscode -ARG USER_UID=1000 -ARG USER_GID=$USER_UID - -RUN groupadd --gid $USER_GID $USERNAME && \ - useradd --uid $USER_UID --gid $USER_GID -m $USERNAME && \ - echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME && \ - chmod 0440 /etc/sudoers.d/$USERNAME - -# Set up Go workspace -ENV GOPATH=/go -ENV PATH=$GOPATH/bin:/usr/local/go/bin:$PATH - -# Create Go workspace directories with correct permissions -RUN mkdir -p /go/src /go/bin /go/pkg && \ - chown -R $USERNAME:$USERNAME /go + sudo && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* -# Switch to the non-root user -USER $USERNAME +# Install GitHub Copilot CLI (architecture-aware) +RUN ARCH=$(uname -m) && \ + if [ "$ARCH" = "x86_64" ]; then \ + COPILOT_ARCH="amd64"; \ + elif [ "$ARCH" = "aarch64" ] || [ "$ARCH" = "arm64" ]; then \ + COPILOT_ARCH="arm64"; \ + else \ + echo "Unsupported architecture: $ARCH" && exit 1; \ + fi && \ + curl -fsSL -o /tmp/copilot.tar.gz "https://github.com/github/copilot-cli/releases/download/v0.0.366-9/copilot-linux-${COPILOT_ARCH}.tar.gz" && \ + tar -xzf /tmp/copilot.tar.gz -C /usr/local/bin && \ + chmod +x /usr/local/bin/copilot && \ + rm -f /tmp/copilot.tar.gz # Set working directory WORKDIR /workspace From 49126fb8977bf59327e9b29313a91425013bbf20 Mon Sep 17 00:00:00 2001 From: Matt Farina Date: Wed, 3 Dec 2025 14:25:28 -0500 Subject: [PATCH 2/2] Remove devcontainer The devcontainer is getting opinionated for my style. Removing as others can provide their own. Signed-off-by: Matt Farina --- .devcontainer/Dockerfile | 38 --------------------------------- .devcontainer/devcontainer.json | 19 ----------------- .gitignore | 3 +++ 3 files changed, 3 insertions(+), 57 deletions(-) delete mode 100644 .devcontainer/Dockerfile delete mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile deleted file mode 100644 index 034cc6e..0000000 --- a/.devcontainer/Dockerfile +++ /dev/null @@ -1,38 +0,0 @@ -# Use the official Go + Node.js devcontainer base image -FROM mcr.microsoft.com/devcontainers/go:1.25 - -# Install Node.js -RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \ - apt-get install -y nodejs && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* - -# Install VCS tools and other dependencies -RUN apt-get update && \ - apt-get install -y \ - git \ - mercurial \ - subversion \ - bzr \ - make \ - curl \ - sudo && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* - -# Install GitHub Copilot CLI (architecture-aware) -RUN ARCH=$(uname -m) && \ - if [ "$ARCH" = "x86_64" ]; then \ - COPILOT_ARCH="amd64"; \ - elif [ "$ARCH" = "aarch64" ] || [ "$ARCH" = "arm64" ]; then \ - COPILOT_ARCH="arm64"; \ - else \ - echo "Unsupported architecture: $ARCH" && exit 1; \ - fi && \ - curl -fsSL -o /tmp/copilot.tar.gz "https://github.com/github/copilot-cli/releases/download/v0.0.366-9/copilot-linux-${COPILOT_ARCH}.tar.gz" && \ - tar -xzf /tmp/copilot.tar.gz -C /usr/local/bin && \ - chmod +x /usr/local/bin/copilot && \ - rm -f /tmp/copilot.tar.gz - -# Set working directory -WORKDIR /workspace diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json deleted file mode 100644 index 681c35b..0000000 --- a/.devcontainer/devcontainer.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "VCS Development Container", - "build": { - "dockerfile": "Dockerfile" - }, - "customizations": { - "vscode": { - "settings": { - "go.toolsManagement.checkForUpdates": "local", - "go.useLanguageServer": true - }, - "extensions": [ - "golang.go" - ] - } - }, - "postCreateCommand": "go mod download", - "remoteUser": "vscode" -} diff --git a/.gitignore b/.gitignore index daf913b..2d02ccc 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,6 @@ _testmain.go *.exe *.test *.prof + +# DevContainer - allow developers to have their own setup +.devcontainer/