Conversation
There was a problem hiding this comment.
Pull request overview
Adds a VS Code Dev Container setup to standardize local development for MCP Gateway contributors and make it easier to run/build/lint/test inside a containerized environment.
Changes:
- Introduces
.devcontainer/devcontainer.jsonwith Go-focused VS Code settings, extensions, and port forwarding. - Adds a
.devcontainer/Dockerfileto build a Go 1.25-based dev image, install tooling, and warm the Go module cache.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| .devcontainer/devcontainer.json | Defines the devcontainer build, features (DinD, GitHub CLI), VS Code settings/extensions, and forwarded ports. |
| .devcontainer/Dockerfile | Builds the devcontainer image, installs golangci-lint and common CLI tools, and pre-downloads Go modules. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh \ | ||
| | sh -s -- -b /usr/local/bin ${GOLANGCI_LINT_VERSION} |
There was a problem hiding this comment.
The devcontainer installs golangci-lint by piping a script from the master branch of an external repo into sh. This is not reproducible and increases supply-chain risk (the script contents can change without any version bump). Prefer downloading a specific released artifact (or pinning the installer script to a commit) and verifying checksums/signatures so the devcontainer build is deterministic.
| RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh \ | |
| | sh -s -- -b /usr/local/bin ${GOLANGCI_LINT_VERSION} | |
| ARG GOLANGCI_LINT_CHECKSUM=REPLACE_WITH_SHA256_FOR_v2_8_0_LINUX_AMD64 | |
| RUN set -eux; \ | |
| arch="$(uname -m)"; \ | |
| case "$arch" in \ | |
| x86_64) golangci_arch="amd64" ;; \ | |
| aarch64) golangci_arch="arm64" ;; \ | |
| *) echo "Unsupported architecture: $arch" >&2; exit 1 ;; \ | |
| esac; \ | |
| version="${GOLANGCI_LINT_VERSION#v}"; \ | |
| url="https://github.com/golangci/golangci-lint/releases/download/${GOLANGCI_LINT_VERSION}/golangci-lint-${version}-linux-${golangci_arch}.tar.gz"; \ | |
| curl -sSfL "$url" -o /tmp/golangci-lint.tar.gz; \ | |
| echo "${GOLANGCI_LINT_CHECKSUM} /tmp/golangci-lint.tar.gz" | sha256sum -c -; \ | |
| tar -xzf /tmp/golangci-lint.tar.gz -C /tmp; \ | |
| mv "/tmp/golangci-lint-${version}-linux-${golangci_arch}/golangci-lint" /usr/local/bin/; \ | |
| rm -rf /tmp/golangci-lint* |
No description provided.