Skip to content

Commit 3a8894f

Browse files
shimbacoclaude
andcommitted
開発環境にClaude Code用ツールを追加
- fzf, jq, nano, ripgrep, tree, vimをインストール - claude-codeとMCPサーバーをnpmでインストール - gitのユーザー設定を追加 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent beaec96 commit 3a8894f

File tree

2 files changed

+60
-28
lines changed

2 files changed

+60
-28
lines changed

go/Dockerfile.dev

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,30 @@ ARG USER_ID=1000
44
ARG GROUP_ID=1000
55
ARG USERNAME=developer
66

7-
RUN \
8-
apt update && \
9-
apt dist-upgrade -yq && \
10-
apt install -y --no-install-recommends \
11-
build-essential \
12-
curl \
13-
git \
14-
# PostgreSQLのインストールに必要
15-
gnupg \
16-
# PostgreSQLのインストールに必要
17-
lsb-release \
18-
sudo \
19-
zsh \
20-
&& rm -rf /var/lib/apt/lists/*
7+
RUN <<EOF
8+
apt update
9+
apt dist-upgrade -yq
10+
11+
PACKAGES=$(cat <<'PKGLIST' | sed 's/#.*//'
12+
build-essential
13+
curl
14+
fzf # Claude Codeで使用
15+
git
16+
jq # Claude Codeで使用
17+
nano # Claude Codeで使用
18+
gnupg # PostgreSQLのインストールに必要
19+
lsb-release # PostgreSQLのインストールに必要
20+
ripgrep # Claude Codeで使用
21+
sudo
22+
tree # Claude Codeで使用
23+
vim # Claude Codeで使用
24+
zsh
25+
PKGLIST
26+
)
27+
28+
apt install -y --no-install-recommends $PACKAGES
29+
rm -rf /var/lib/apt/lists/*
30+
EOF
2131

2232
# PostgreSQLのインストール
2333
RUN curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg \
@@ -58,6 +68,8 @@ ENV PATH=$NPM_CONFIG_PREFIX/bin:$PATH
5868
COPY --from=1password/op:2 /usr/local/bin/op /usr/local/bin/op
5969

6070
RUN npm install -g pnpm@10.24.0
71+
RUN npm install -g @anthropic-ai/claude-code@latest
72+
RUN npm install -g @modelcontextprotocol/server-filesystem
6173

6274
RUN go install github.com/sqlc-dev/sqlc/cmd/sqlc@v1.30.0
6375
RUN go install github.com/air-verse/air@latest
@@ -73,4 +85,7 @@ ENV SHELL=/bin/zsh
7385

7486
RUN touch /home/${USERNAME}/.zshrc
7587

88+
RUN git config --global user.email "me@shimba.co" && \
89+
git config --global user.name "Koji Shimba"
90+
7691
CMD ["/bin/zsh"]

rails/Dockerfile.dev

Lines changed: 31 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,32 @@ ARG USER_ID=1000
44
ARG GROUP_ID=1000
55
ARG USERNAME=developer
66

7-
RUN \
8-
apt update && \
9-
apt dist-upgrade -yq && \
10-
apt install -y --no-install-recommends \
11-
build-essential \
12-
curl \
13-
git \
14-
# PostgreSQLやNode.jsのインストールに必要
15-
gnupg \
16-
# PostgreSQLのインストールに必要
17-
lsb-release \
18-
sudo \
19-
zsh && \
20-
rm -rf /var/lib/apt/lists/*
7+
RUN <<EOF
8+
apt update
9+
apt dist-upgrade -yq
10+
11+
PACKAGES=$(cat <<'PKGLIST' | sed 's/#.*//'
12+
build-essential
13+
curl
14+
fzf # Claude Codeで使用
15+
git
16+
gnupg # PostgreSQLやNode.jsのインストールに必要
17+
jq # Claude Codeで使用
18+
libglib2.0-0
19+
libvips42
20+
lsb-release # PostgreSQLのインストールに必要
21+
nano # Claude Codeで使用
22+
ripgrep # Claude Codeで使用
23+
sudo
24+
tree # Claude Codeで使用
25+
vim # Claude Codeで使用
26+
zsh
27+
PKGLIST
28+
)
29+
30+
apt install -y --no-install-recommends $PACKAGES
31+
rm -rf /var/lib/apt/lists/*
32+
EOF
2133

2234
# PostgreSQLのセットアップ
2335
RUN curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg \
@@ -49,6 +61,8 @@ ENV PATH=$NPM_CONFIG_PREFIX/bin:$PATH
4961
COPY --from=1password/op:2 /usr/local/bin/op /usr/local/bin/op
5062

5163
RUN npm install --global yarn@1.22.19
64+
RUN npm install -g @anthropic-ai/claude-code@latest
65+
RUN npm install -g @modelcontextprotocol/server-filesystem
5266

5367
RUN gem install bundler -v 2.5.9
5468

@@ -58,4 +72,7 @@ ENV SHELL=/bin/zsh
5872

5973
RUN touch /home/${USERNAME}/.zshrc
6074

75+
RUN git config --global user.email "me@shimba.co" && \
76+
git config --global user.name "Koji Shimba"
77+
6178
CMD ["/bin/zsh"]

0 commit comments

Comments
 (0)