Skip to content

Commit 95a1af1

Browse files
authored
Add Dev Container configuration (#38)
1 parent e464e00 commit 95a1af1

3 files changed

Lines changed: 37 additions & 0 deletions

File tree

.devcontainer/Dockerfile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
FROM mcr.microsoft.com/devcontainers/ruby:2.7-bullseye
2+
3+
# Configure editors and pagers
4+
ENV EDITOR="nano" \
5+
VISUAL="code --wait" \
6+
PAGER="less" \
7+
LESS="-FMR"
8+
9+
# Silence Ruby deprecation warnings
10+
ENV RUBYOPT="-W:no-deprecated"
11+
12+
# Configure ruby/debug gem
13+
ENV RUBY_DEBUG_HISTORY_FILE="/workspace/.rdbg_history" \
14+
RUBY_DEBUG_SAVE_HISTORY="1000"
15+
16+
# Configure RubyGems to skip gem documentation
17+
RUN echo "gem: --no-document" >> ~/.gemrc
18+
19+
WORKDIR /workspace

.devcontainer/devcontainer.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"name": "webmention-client-ruby",
3+
"features": {},
4+
"customizations": {},
5+
"workspaceFolder": "/workspace",
6+
"dockerComposeFile": "docker-compose.yml",
7+
"service": "default",
8+
"postCreateCommand": "bundle install"
9+
}

.devcontainer/docker-compose.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
services:
2+
default:
3+
build:
4+
context: ..
5+
dockerfile: .devcontainer/Dockerfile
6+
command: sleep infinity
7+
init: true
8+
volumes:
9+
- ..:/workspace:cached

0 commit comments

Comments
 (0)