Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

564
Vistas
Why I got Permission denied inside Docker container after npx create?

This is what I have done in the first place

docker run --name=nodesetup -it --mount type=bind,source="$(pwd)",target=/usr/src/app -w /usr/src/app 
node bash  

Mysql2 works fine

npm i mysql2

when I go for

npx create-react-app test-client
sh: 1: create-react-app: Permission denied

I am bind mounted root@83d263a01dc7:/usr/src/app/test-app#.

How to solve this?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

It's an issue with permissions on the host directory that you map. What exactly the issue is, I can't figure out. The container runs as root, so it should have access.

But if you run your container with the UID and GID of your user on the host by adding -u $(id -u):$(id -g) as an option, it works. Like this

docker run --name=nodesetup -it --mount type=bind,source="$(pwd)",target=/usr/src/app -w /usr/src/app -u $(id -u):$(id -g) node bash

This also has the advantage that the files created on the host are owned by you, making it easier to edit them, etc.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda