以下のコマンドを実行するのみ
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash source ~/.bashrc nvm install stable --latest-npm nvm use stable npm install -g @anthropic-ai/claude-code
Paste code here if prompted >と出てそこに認証コードを貼り付ける式なので,Dockerコンテナ内でも使えるみたい.ありがたい.GCPのOAuthは確かリダイレクト式だったからDockerコンテナで使えなかったんだよな
参考: Claude CodeがVSCoed(Cursor, Windsurf)にインストールできない時の対処法
nvm(Node Version Manager)を使ってNode.jsをインストールする手順 #Node.js - Qiita