Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM mcr.microsoft.com/vscode/devcontainers/base:ubuntu-24.04

RUN apt install curl ca-certificates git
9 changes: 9 additions & 0 deletions .devcontainer/boot
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

echo "Updating RubyGems..."
gem update --system -N

echo "Installing dependencies..."
bundle install

echo "Done!"
50 changes: 50 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"name": "Ruby development",
"dockerComposeFile": "docker-compose.yml",
"service": "app",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers/features/common-utils:2": {
"username": "vscode",
"userUid": 1001,
"userGid": 1001,
"installZsh": true,
"installOhMyZsh": true,
"configureZshAsDefaultShell": true,
"upgradePackages": true
},
"ghcr.io/rocker-org/devcontainer-features/apt-packages:1": {
"packages": "libpq-dev, libvips"
},
"ghcr.io/devcontainers/features/ruby:1": {
"version": "3.4.1"
},
"ghcr.io/devcontainers/features/node:1": {},
"ghcr.io/devcontainers-extra/features/zsh-plugins:0": {
"username": "vscode",
"plugins": "bundler rails ruby yarn git"
},
"ghcr.io/devcontainers/features/sshd:1": {
"version": "latest"
}
},

// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": ["Shopify.ruby-lsp", "EditorConfig.EditorConfig"]
}
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// This can be used to network with other containers or the host.
"forwardPorts": [5433],

"postStartCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}",

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": ".devcontainer/boot",

"remoteUser": "vscode"
}
8 changes: 8 additions & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
services:
app:
build:
context: ..
dockerfile: .devcontainer/Dockerfile
volumes:
- ../..:/workspaces:cached
command: sleep infinity