Skip to content

Commit

Permalink
Merge pull request #119 from perl-entrance-org/feature-codespaces
Browse files Browse the repository at this point in the history
Riji 入りで Codespaces を起動する設定を追加
  • Loading branch information
xtetsuji authored Mar 30, 2024
2 parents 928eaf5 + 564754a commit b5a0370
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# 基本イメージとしてVS Codeの汎用開発コンテナベースイメージを使用
FROM mcr.microsoft.com/vscode/devcontainers/base:ubuntu

# Perl、cpanminus、および必要なビルドツールのインストール
RUN sudo apt-get update \
&& sudo apt-get install -y perl cpanminus build-essential \
&& sudo rm -rf /var/lib/apt/lists/*

# App::cpm のインストール
# TODO: cpm 自体のインストール速度を上げたい
RUN cpanm App::cpm

# App::cpm を使用して Riji パッケージを並列でインストール
# TODO: --no-test しないと Riji が必要とする Git::Repository などがエラーになる
RUN cpm install --no-test -g Riji

# 作業ディレクトリの設定
# WORKDIR /workspace

# 標準で実行されるコマンドを指定 (ここでは bash を使う)
# CMD ["/bin/bash"]
15 changes: 15 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "Perl & Riji Project",
"build": {
"dockerfile": "Dockerfile",
"context": "."
},
"customizations": {
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
},
"extensions": []
},
"postCreateCommand": "cpanm Riji",
"remoteUser": "vscode"
}

0 comments on commit b5a0370

Please sign in to comment.