Title: Permission denied error when trying to install pnpm via Corepack as node user · Issue #1732 · nodejs/docker-node · GitHub
Open Graph Title: Permission denied error when trying to install pnpm via Corepack as node user · Issue #1732 · nodejs/docker-node
X Title: Permission denied error when trying to install pnpm via Corepack as node user · Issue #1732 · nodejs/docker-node
Description: Environment Node.js Version: 16.15.0 Image Tag: lts-alpine Expected Behavior I should be able to install pnpm using Corepack as a non-privilegied user. Current Behavior When I try to install pnpm via Corepack (corepack enable) as non-pri...
Open Graph Description: Environment Node.js Version: 16.15.0 Image Tag: lts-alpine Expected Behavior I should be able to install pnpm using Corepack as a non-privilegied user. Current Behavior When I try to install pnpm v...
X Description: Environment Node.js Version: 16.15.0 Image Tag: lts-alpine Expected Behavior I should be able to install pnpm using Corepack as a non-privilegied user. Current Behavior When I try to install pnpm v...
Opengraph URL: https://github.com/nodejs/docker-node/issues/1732
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Permission denied error when trying to install pnpm via Corepack as node user","articleBody":"\u003c!--\r\nThank you for reporting an issue with the Node.js image.\r\n\r\nPlease fill in as much of the template below as you're able.\r\n--\u003e\r\n\r\n## Environment\r\n\r\n* **Node.js Version**: 16.15.0\r\n* **Image Tag**: lts-alpine\r\n\r\n## Expected Behavior\r\n\r\n\u003c!--\r\nTell us what should happen. If possible please provide textual output instead of screenshots.\r\n--\u003e\r\n\r\nI should be able to install pnpm using Corepack as a non-privilegied user.\r\n\r\n## Current Behavior\r\n\r\n\u003c!--\r\nTell us what happens instead of the expected behavior. If possible please provide textual output instead of screenshots.\r\n--\u003e\r\n\r\nWhen I try to install pnpm via Corepack (`corepack enable`) as non-privilegied user (`-u node`), I get the following error:\r\n\r\n```txt\r\n/app $ corepack enable\r\nInternal Error: EACCES: permission denied, symlink '../lib/node_modules/corepack/dist/pnpm.js' -\u003e '/usr/local/bin/pnpm'\r\nError: EACCES: permission denied, symlink '../lib/node_modules/corepack/dist/pnpm.js' -\u003e '/usr/local/bin/pnpm'\r\n/app $ \r\n```\r\n\r\nRunning `corepack enable` as `root` work as expected.\r\n\r\n```\r\ndocker run -it -v $(pwd):/app node:lts-alpine /bin/sh\r\n```\r\n\r\n\r\n\r\n\r\n## Steps to Reproduce\r\n\r\n\u003c!--\r\nTell us about the steps you took to encounter this bug with the image.\r\n--\u003e\r\n\r\n1. Create an empty project with the following `package.json`. The `packageManager` property is important here.\r\n\r\n ```json\r\n {\r\n \"name\": \"docker-node-pnpm\",\r\n \"version\": \"1.0.0\",\r\n \"private\": true,\r\n \"packageManager\": \"pnpm@7.1.7\"\r\n }\r\n ```\r\n2. Run the container as a non-privilegied user: `docker run -it -v $(pwd):/app -u node node:lts-alpine /bin/sh`\r\n3. `cd /app`\r\n4. `corepack enable` \u003c-- This should fail\r\n5. `corepack prepare`\r\n6. `pnpm install`\r\n","author":{"url":"https://github.com/bgondy","@type":"Person","name":"bgondy"},"datePublished":"2022-06-03T13:29:38.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":11},"url":"https://github.com/1732/docker-node/issues/1732"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:9b78e862-fe9a-9245-6b8c-e0458bb0662c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B870:3007FC:931D1F:CE57AA:6A4E7BA5 |
| html-safe-nonce | 58c7a0f1c7520d78e8040489ab3ff1c004332e77e3b3c95789938507ef13c3a6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCODcwOjMwMDdGQzo5MzFEMUY6Q0U1N0FBOjZBNEU3QkE1IiwidmlzaXRvcl9pZCI6IjQzNTA3ODM4NTk1Mzg2ODg5MzMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 2f0361979974111c4979a6e6dafbdb86b8319468426f71a3c58140e22e67e546 |
| hovercard-subject-tag | issue:1259919727 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/docker-node/1732/issue_layout |
| twitter:image | https://opengraph.githubassets.com/aba9a7429e004c747cd420429b06df98f7ddcb1a07783ab730abe033169cd811/nodejs/docker-node/issues/1732 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/aba9a7429e004c747cd420429b06df98f7ddcb1a07783ab730abe033169cd811/nodejs/docker-node/issues/1732 |
| og:image:alt | Environment Node.js Version: 16.15.0 Image Tag: lts-alpine Expected Behavior I should be able to install pnpm using Corepack as a non-privilegied user. Current Behavior When I try to install pnpm v... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | bgondy |
| hostname | github.com |
| expected-hostname | github.com |
| None | 41b6ab3ba6d20a71766ac245b5a4a94c6fc672a9cd4da7d44c1b33ab8bf6a21c |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/docker-node git https://github.com/nodejs/docker-node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27929056 |
| octolytics-dimension-repository_nwo | nodejs/docker-node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27929056 |
| octolytics-dimension-repository_network_root_nwo | nodejs/docker-node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e6a744804e8e70f97b4d5a18a94dcc63db22f97a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width