Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

565
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda