Skip to content

Commit 3671e15

Browse files
author
Peter H. Boling
committed
πŸ§‘β€πŸ’» devcontainer for debugging with Ruby 2.5
1 parent 95b8ef8 commit 3671e15

3 files changed

Lines changed: 42 additions & 0 deletions

File tree

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"name": "Apt Install Packages",
3+
"id": "apt-install",
4+
"version": "1.0.0",
5+
"description": "More packages are needed",
6+
"install": {
7+
"script": "install.sh"
8+
}
9+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
apt-get update -y
3+
apt-get install -y direnv default-jdk git zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common libffi-dev
4+
# Adds the direnv setup script to ~/.bashrc file (at the end)
5+
echo 'eval "$(direnv hook bash)"' >> ~/.bashrc
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/ruby
3+
{
4+
"name": "Ruby 2.5 on Debian",
5+
"image": "ruby:2.5-slim-buster", // Specify the Ruby 2.5 image
6+
"postCreateCommand": "RUBYGEMS_VERSION=3.3.27\ngem install rubygems-update -v ${RUBYGEMS_VERSION} > /dev/null 2>&1\nupdate_rubygems > /dev/null 2>&1\n", // Optional: Run this command after the container is created
7+
8+
// Features to add to the dev container. More info: https://containers.dev/features.
9+
"features": {
10+
"./apt-install": {}
11+
},
12+
13+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
14+
// "forwardPorts": [],
15+
16+
// Use 'postCreateCommand' to run commands after the container is created.
17+
// "postCreateCommand": "ruby --version",
18+
19+
// Configure tool-specific properties.
20+
"customizations" : {
21+
"jetbrains" : {
22+
"backend" : "RubyMine"
23+
}
24+
},
25+
26+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
27+
// "remoteUser": "root"
28+
}

0 commit comments

Comments
Β (0)