Skip to content

Commit d39b204

Browse files
committed
Install Claude Code
1 parent c6ab1b0 commit d39b204

File tree

3 files changed

+36
-0
lines changed

3 files changed

+36
-0
lines changed

.devcontainer/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM mcr.microsoft.com/devcontainers/base:ubuntu-24.04
2+
3+
4+
# Install claude-code globally
5+
RUN npm i -g @anthropic-ai/claude-code

.devcontainer/devcontainer.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// The Dev Container format allows you to configure your environment. At the heart of it
2+
// is a Docker image or Dockerfile which controls the tools available in your environment.
3+
//
4+
// See https://aka.ms/devcontainer.json for more information.
5+
{
6+
"name": "Gitpod",
7+
// Use "image": "mcr.microsoft.com/devcontainers/base:ubuntu-24.04",
8+
// instead of the build to use a pre-built image.
9+
"build": {
10+
"context": ".",
11+
"dockerfile": "Dockerfile"
12+
}
13+
// Features add additional features to your environment. See https://containers.dev/features
14+
// Beware: features are not supported on all platforms and may have unintended side-effects.
15+
// "features": {
16+
// "ghcr.io/devcontainers/features/docker-in-docker": {
17+
// "moby": false
18+
// }
19+
// }
20+
}

.gitpod/automations.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
tasks:
2+
setup-claude-code-key:
3+
name: Key for Claude Code
4+
command: |
5+
[ -f /opt/.anthropic_key.sh ] && {
6+
install -D -m 755 /opt/.anthropic_key.sh ~/.claude/.anthropic_key.sh
7+
result=$(cat ~/.claude/settings.json 2>/dev/null || echo "{}" | jq '.apiKeyHelper = "~/.claude/.anthropic_key.sh"') && echo "$result" > ~/.claude/settings.json || true
8+
} || true
9+
triggeredBy:
10+
- postEnvironmentStart
11+

0 commit comments

Comments
 (0)