Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Dev Container configuration #38

Merged
merged 1 commit into from
Nov 27, 2023
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
19 changes: 19 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM mcr.microsoft.com/devcontainers/ruby:2.7-bullseye

# Configure editors and pagers
ENV EDITOR="nano" \
VISUAL="code --wait" \
PAGER="less" \
LESS="-FMR"

# Silence Ruby deprecation warnings
ENV RUBYOPT="-W:no-deprecated"

# Configure ruby/debug gem
ENV RUBY_DEBUG_HISTORY_FILE="/workspace/.rdbg_history" \
RUBY_DEBUG_SAVE_HISTORY="1000"

# Configure RubyGems to skip gem documentation
RUN echo "gem: --no-document" >> ~/.gemrc

WORKDIR /workspace
9 changes: 9 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": "webmention-client-ruby",
"features": {},
"customizations": {},
"workspaceFolder": "/workspace",
"dockerComposeFile": "docker-compose.yml",
"service": "default",
"postCreateCommand": "bundle install"
}
9 changes: 9 additions & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
services:
default:
build:
context: ..
dockerfile: .devcontainer/Dockerfile
command: sleep infinity
init: true
volumes:
- ..:/workspace:cached