11// .devcontainer/devcontainer.json
22{
3- "name" : " Fluent Plugin Datadog Dev" , // A friendly name
4- // Specify the path to the custom Dockerfile
3+ "name" : " Fluent Plugin Datadog Dev" ,
54 "build" : {
65 "dockerfile" : " Dockerfile"
76 },
8- // Use the non-root user created in the Dockerfile
9- "remoteUser" : " vscode" ,
10- // Set the workspace folder inside the container
117 "workspaceFolder" : " /workspaces/fluent-plugin-datadog" ,
12- // Command to run after the container is created and the workspace is mounted.
13- // This installs the gem dependencies using Bundler.
14- "postCreateCommand" : " bundle install && sh -c \" $(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)\" " ,
15- // Forward ports that might be useful (e.g., for testing Fluentd)
16- // Fluentd's default forward port is 24224. The repo's docker-compose also uses this.
17- "forwardPorts" : [
18- 24224
19- ],
20- // Configuration specific to VS Code
8+ "postCreateCommand" : " bundle install --jobs 4 --retry 3" ,
219 "customizations" : {
2210 "vscode" : {
23- "settings" : {
24- // Optional: Configure Ruby environment settings if needed
25- "ruby.useBundler" : true ,
26- "ruby.lint" : {
27- "rubocop" : true
28- },
29- "ruby.format" : " rubocop" ,
30- // Add other Ruby or general settings here
31- // Configure VS Code's integrated terminal to use Zsh
32- "terminal.integrated.defaultProfile.linux" : " zsh (2)" ,
33- "terminal.integrated.profiles.linux" : {
34- "zsh (2)" : {
35- "path" : " zsh"
36- }
37- }
38- },
39- // Specify VS Code extensions to install automatically
4011 "extensions" : [
41- " rebornix.ruby" , // Official Ruby extension
42- " bungcip.better-toml" , // For TOML config files
43- " kaiinui.vscode-ruby-test-explorer" , // If you want a test explorer UI
44- " dbaeumer.vscode-eslint" , // If there are JS parts or linting
45- " redhat.vscode-yaml" , // For YAML files (like the docker-compose)
46- " ms-azuretools.vscode-docker" // Useful for working with Docker inside VS Code
47- // Add any other extensions relevant to your workflow
48- ]
12+ " shopify.ruby-lsp" ,
13+ " ms-azuretools.vscode-docker"
14+ ],
15+ "settings" : {
16+ "rubyLsp.bundleExec" : true ,
17+ "rubyLsp.useBundler" : true
18+ }
4919 }
5020 }
51- // Uncomment to connect as root instead of the remoteUser.
52- // "remoteUser": "root"
5321}
0 commit comments