Skip to content

Commit eaf2168

Browse files
committed
Rebuild and modernize Dev Container setup
1 parent 84d2a67 commit eaf2168

2 files changed

Lines changed: 16 additions & 24 deletions

File tree

.devcontainer/devcontainer.json

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,33 @@
11
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
22
// README at: https://github.com/devcontainers/templates/tree/main/src/ruby
33
{
4-
"name": "indieweb-endpoints-ruby",
4+
"name": "webmention-client-ruby",
55
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6-
"image": "mcr.microsoft.com/devcontainers/ruby:1-3.3-bookworm",
6+
"image": "mcr.microsoft.com/devcontainers/base:1-bookworm",
77

88
// Features to add to the dev container. More info: https://containers.dev/features.
99
"features": {
10-
"ghcr.io/devcontainers-contrib/features/apt-packages:1": {
11-
"packages": "less,nano"
10+
"ghcr.io/rails/devcontainer/features/ruby:1": {
11+
"version": "3.4.3"
1212
}
1313
},
1414

1515
// Use 'forwardPorts' to make a list of ports inside the container available locally.
1616
// "forwardPorts": [],
1717

18+
// An array of Docker CLI arguments that should be used when running the container.
19+
"runArgs": ["--name", "webmention-client-ruby"],
20+
1821
// Use 'postCreateCommand' to run commands after the container is created.
19-
"postCreateCommand": "bundle install",
22+
"postCreateCommand": ".devcontainer/setup.sh",
2023

2124
// Configure tool-specific properties.
2225
"customizations": {
23-
// Configure properties specific to VS Code.
2426
"vscode": {
25-
// Set *default* container specific settings.json values on container create.
26-
"settings": {
27-
"rubyLsp:formatter": "none",
28-
"rubyLsp.rubyVersionManager": "none"
29-
},
3027
"extensions": [
31-
"EditorConfig.EditorConfig",
32-
"jasonnutter.vscode-codeowners",
33-
"Shopify.ruby-lsp"
28+
"EditorConfig.EditorConfig"
3429
]
3530
}
36-
},
37-
38-
// Set or override environment variables for the container.
39-
"containerEnv": {
40-
"EDITOR": "nano",
41-
"LESS": "-FMR",
42-
"PAGER": "less",
43-
"RUBY_DEBUG_HISTORY_FILE": "${containerWorkspaceFolder}/.rdbg_history",
44-
"RUBY_DEBUG_SAVE_HISTORY": "1000",
45-
"VISUAL": "code --wait"
4631
}
4732

4833
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.

.devcontainer/setup.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env bash
2+
3+
set -euo pipefail
4+
IFS=$'\n\t'
5+
set -vx
6+
7+
bundle install

0 commit comments

Comments
 (0)