mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-06-13 12:57:12 -07:00
fix(docker): grant write permissions for npm-global directory
Adds a `chown` command to the Dockerfile to grant the `node` user write permissions to the `/usr/local/share/npm-global` directory. This resolves an `EACCES` permission denied error during the `npm install -g` step in the Docker build process.
This commit is contained in:
@@ -10,6 +10,9 @@ ARG CLI_PACKAGE_NAME
|
||||
ENV NPM_CONFIG_PREFIX=/usr/local/share/npm-global
|
||||
ENV PATH=$PATH:/usr/local/share/npm-global/bin
|
||||
|
||||
# Ensure the node user has permissions to write to the global npm directory
|
||||
RUN mkdir -p /usr/local/share/npm-global && chown -R node:node /usr/local/share/npm-global
|
||||
|
||||
# Configure npm to use GitHub Packages
|
||||
RUN --mount=type=secret,id=GITHUB_TOKEN \
|
||||
echo "${NPM_REGISTRY_SCOPE}:registry=${NPM_REGISTRY_URL}" > /home/node/.npmrc && \
|
||||
|
||||
Reference in New Issue
Block a user