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

468
Visualizações
Docker-compose on Vite

I am dockering a Vite app with Vue. When I run yarn devfrom my system, everything is Ok, but when I launch the same command from my dockerfile, I got the following error

yarn run v1.22.5

warning package.json: No license field

$ vite

failed to load config from /app/vite.config.ts

error when starting dev server:

Error: spawn Unknown system error -8

My dockerfile is

FROM node:14.16.0-alpine3.13

WORKDIR /app

COPY . .

CMD ["yarn", "dev"]

And my docker-compose.yml is

version: '3.8'

services:
  client:
    build: 
      context: ./dockerfiles
      dockerfile: client.dockerfile
    volumes:
      - ./client:/app
    ports:
      - '3000:3000'

My folder structure is

client
|-public
|-src
|-node_modules
|-package.json
|-vite.config.ts
|- ... rest of files
dockerfiles
|-client.dockerfile
docker-compose.yml (at root level)
over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

I haven't quite figured this one out yet, but I think it has something to do with the alpine node image. Try using one of the "slim" images of node instead.

over 4 years ago · Santiago Trujillo Relatório

0

I had the same issue, for some reason docker used the node_modules folder from the project instead of its own (with RUN npm install command). I've solved it by adding a .dockerignore file and ignoring the node_modules of the project.

//.dockerignore

node_modules/*
over 4 years ago · Santiago Trujillo 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