From 7d88a0e90903e8161340cf3a4463ae22c115d041 Mon Sep 17 00:00:00 2001 From: Walid Moghrabi Date: Mon, 16 Nov 2026 17:02:56 +0000 Subject: [PATCH 1/3] feat: add a devcontainer configuration for VSCode --- .devcontainer/devcontainer.json | 39 +++++++++++++++++++++++++++++++++ CONTRIBUTING.md | 4 ++++ 2 files changed, 43 insertions(+) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000..ae46d1e56 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,39 @@ +{ + "name": "aptly - Go 1.26", + "image": "mcr.microsoft.com/devcontainers/go:2-1.26-bookworm", + "remoteUser": "vscode", + "updateRemoteUserUID": true, + "runArgs": ["--network=host"], + "initializeCommand": "mkdir -p \"${localEnv:HOME}/.codex\" \"${localEnv:HOME}/.claude\"", + "mounts": [ + "source=/etc/ssl/certs/ca-certificates.crt,target=/etc/ssl/certs/ca-certificates.crt,type=bind,readonly", + "source=${localEnv:HOME}/.codex,target=/home/vscode/.codex,type=bind", + "source=${localEnv:HOME}/.claude,target=/home/vscode/.claude,type=bind" + ], + "containerEnv": { + "HTTP_PROXY": "${localEnv:HTTP_PROXY}", + "HTTPS_PROXY": "${localEnv:HTTPS_PROXY}", + "NO_PROXY": "${localEnv:NO_PROXY}", + "http_proxy": "${localEnv:http_proxy}", + "https_proxy": "${localEnv:https_proxy}", + "no_proxy": "${localEnv:no_proxy}" + }, + "postCreateCommand": "go mod download", + "forwardPorts": [3142], + "portsAttributes": { + "3142": { + "label": "aptly development server" + } + }, + "customizations": { + "vscode": { + "extensions": [ + "golang.Go" + ], + "settings": { + "go.toolsManagement.autoUpdate": true, + "go.useLanguageServer": true + } + } + } +} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 005f4dabe..90cb14b68 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -105,6 +105,10 @@ To build the development docker image, run: make docker-image ``` +#### Working with VSCode and devcontainers + +A ready-to-use [Dev Container](https://containers.dev/) configuration is provided in `.devcontainer/devcontainer.json`. To use it, open the repository in Visual Studio Code (or another Dev Container-compatible IDE) and choose to reopen the project in the container; the IDE will then build and start the configured development environment. + #### Build aptly To build the aptly in the development docker container, run: From a68f91af89014b58ac084db176abfb873d613fc7 Mon Sep 17 00:00:00 2001 From: Walid Moghrabi Date: Mon, 16 Nov 2026 17:18:46 +0000 Subject: [PATCH 2/3] Missed the authors file --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index 267d9bc57..87d3d510d 100644 --- a/AUTHORS +++ b/AUTHORS @@ -89,3 +89,4 @@ List of contributors, in chronological order: * James Munson (https://github.com/jmunson) * Luan Dang (https://github.com/luanmdang) * Martin Simon (https://github.com/barnumbirr) +* Walid Moghrabi (https://github.com/Hybrid512) From 197cb062a7b38f375fafe7636ab99aa441a3b40a Mon Sep 17 00:00:00 2001 From: Walid Moghrabi Date: Thu, 19 Nov 2026 09:59:44 +0100 Subject: [PATCH 3/3] Add SSH mount to devcontainer configuration --- .devcontainer/devcontainer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index ae46d1e56..ebb94e07e 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -7,6 +7,7 @@ "initializeCommand": "mkdir -p \"${localEnv:HOME}/.codex\" \"${localEnv:HOME}/.claude\"", "mounts": [ "source=/etc/ssl/certs/ca-certificates.crt,target=/etc/ssl/certs/ca-certificates.crt,type=bind,readonly", + "source=${localEnv:HOME}/.ssh,target=/home/vscode/.ssh,type=bind", "source=${localEnv:HOME}/.codex,target=/home/vscode/.codex,type=bind", "source=${localEnv:HOME}/.claude,target=/home/vscode/.claude,type=bind" ],