[DOCS] GitLab CI/CD examples missing PATH configuration for Claude Code binary

Resolved 💬 2 comments Opened Jan 26, 2026 by coygeek Closed Feb 28, 2026

Documentation Type

Incorrect/outdated documentation

Documentation Location

https://code.claude.com/docs/en/gitlab-ci-cd

Section/Topic

  • "Quick setup" section
  • "Basic .gitlab-ci.yml (Claude API)" section
  • "AWS Bedrock job example" section
  • "Google Vertex AI job example" section

Current Documentation

All GitLab CI/CD examples install Claude Code and then call claude directly:

before_script:
- curl -fsSL https://claude.ai/install.sh | bash
script:
- claude -p "..."

What's Wrong or Missing?

The native installer installs Claude Code to ~/.local/bin/claude. However, in container images (especially Alpine-based images like node:24-alpine3.21), ~/.local/bin is not in the default $PATH.

The troubleshooting documentation confirms this:

"This command installs... and adds a symlink to the installation at ~/.local/bin/claude" "Make sure that you have the installation directory in your system PATH."

Without adding ~/.local/bin to PATH, the claude command in the script section will fail with "command not found".

Suggested Improvement

Add PATH configuration after installation in all examples:

Before:

before_script:
- apk update
- apk add --no-cache git curl bash
- curl -fsSL https://claude.ai/install.sh | bash
script:
- claude -p "..."

After:

before_script:
- apk update
- apk add --no-cache git curl bash
- curl -fsSL https://claude.ai/install.sh | bash
- export PATH="$HOME/.local/bin:$PATH"
script:
- claude -p "..."

Alternatively, document calling the binary via its full path: ~/.local/bin/claude.

Impact

High - Prevents users from using a feature

Additional Context

Affected Pages:
| Page | Line(s) | Example Name |
|------|---------|--------------|
| https://code.claude.com/docs/en/gitlab-ci-cd | 84 | Quick setup |
| https://code.claude.com/docs/en/gitlab-ci-cd | 262 | Basic .gitlab-ci.yml |
| https://code.claude.com/docs/en/gitlab-ci-cd | 296 | AWS Bedrock job |
| https://code.claude.com/docs/en/gitlab-ci-cd | 347 | Google Vertex AI job |

Total scope: 1 page, 4 code examples

Related Issues:

  • #18966 covers missing Alpine dependencies (libgcc, libstdc++, ripgrep)
  • This issue covers missing PATH configuration (distinct problem, same page)

Both issues affect the same GitLab CI/CD examples and should ideally be fixed together.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗