Skip to content

Fix npm global install permissions in memax-dev Dockerfile#2

Merged
dizys merged 1 commit into
mainfrom
codex/fix-permissions-error-during-docker-build
Apr 14, 2026
Merged

Fix npm global install permissions in memax-dev Dockerfile#2
dizys merged 1 commit into
mainfrom
codex/fix-permissions-error-during-docker-build

Conversation

@dizys

@dizys dizys commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

Motivation

  • Building the image failed with EACCES when running npm install -g @openai/codex because the Dockerfile was running global npm installs as USER coder while npm's default global location is root-owned /usr/lib/node_modules.
  • Several chown lines used relative paths (missing leading /) which could cause ownership changes to target incorrect locations.

Description

  • Add ENV NPM_CONFIG_PREFIX="/home/coder/.local" so global npm installs write into a user-writable location when running as coder.
  • Fix chown paths for .codex, .gemini, and .copilot to use absolute /home/coder/... paths.
  • Preserve existing creation and ownership of /home/coder/.local/bin so the new npm prefix is usable by the coder user.

Testing

  • Ran git diff --check to validate there are no whitespace or patch issues and it passed.
  • Inspected the updated Dockerfile segment with nl -ba to confirm the env and chown changes are present and correct.
  • Did not run a full docker build in this environment; the change is a configuration fix that addresses the observed EACCES install failure.

Codex Task

@dizys
dizys merged commit d3455f5 into main Apr 14, 2026
1 check passed
@dizys
dizys deleted the codex/fix-permissions-error-during-docker-build branch April 14, 2026 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant