Skip to content

Commit

Permalink
devcontainer with ruby 2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
pcai committed Sep 29, 2024
1 parent 94a4122 commit c1943ca
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 22 deletions.
7 changes: 7 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# [Choice] Ruby version (use -bullseye variants on local arm64/Apple Silicon): 3, 3.3, 3.2, 3.1, 3-bookworm, 3.3-bookworm, 3.2-bookworm, 3.1-bookworm, 3-bullseye, 3.3-bullseye, 3.2-bullseye, 3.1-bullseye, 3-buster, 3.2-buster 3.1-buster
ARG VARIANT=2.6
FROM ruby:${VARIANT}

RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# Remove imagemagick due to https://security-tracker.debian.org/tracker/CVE-2019-10131
&& apt-get purge -y imagemagick imagemagick-6-common
41 changes: 21 additions & 20 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/ruby
{
"name": "Ruby",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/ruby:1-3.3-bullseye"

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

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

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "ruby --version",

// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
"build": {
"dockerfile": "./Dockerfile",
"context": "."
},
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"installZsh": "true",
"username": "vscode",
"userUid": "1000",
"userGid": "1000",
"upgradePackages": "true"
},
"ghcr.io/devcontainers/features/ruby:1": "none",
"ghcr.io/devcontainers/features/node:1": "none",
"ghcr.io/devcontainers/features/git:1": {
"version": "latest",
"ppa": "false"
}
},
// Set `remoteUser` to `root` to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode"
}
3 changes: 2 additions & 1 deletion gemfiles/rails_6_0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ source "https://rubygems.org"
gem "rails", "~> 6.0.0"

group :development, :test do
gem "sqlite3", '~> 1.4', platform: [:ruby, :mswin, :mingw]
gem "sqlite3", '~> 1.4.0', platform: [:ruby, :mswin, :mingw]
gem "activerecord-jdbcsqlite3-adapter", "~> 1.3.13", platform: :jruby
gem "test-unit", "~> 3.0"
gem "psych", "~> 3.0"
gem "ffi", "~> 1.15.0"
end

gemspec path: "../"
3 changes: 2 additions & 1 deletion gemfiles/rails_6_1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ gem "net-imap", require: false
gem "net-pop", require: false

group :development, :test do
gem "sqlite3", '~> 1.4', platform: [:ruby, :mswin, :mingw]
gem "sqlite3", '~> 1.4.0', platform: [:ruby, :mswin, :mingw]
gem "activerecord-jdbcsqlite3-adapter", "~> 1.3.13", platform: :jruby
gem "test-unit", "~> 3.0"
gem "ffi", "~> 1.15.0"
end

gemspec path: "../"

0 comments on commit c1943ca

Please sign in to comment.