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

712
Visualizações
run nuxt.js project with docker-compose

I am trying to deploy my nuxt project with docker so i create Dockerfile and docker-compose.yml and also the .dockerignore file but it giving me errors it's my first time to work with docker i follow the process from the official documentation but i do not really a strong understanding about docker. If i miss something or anymore understand why there is an error while i'm trying to build docker-compose please let me know.

Dockerfile

 FROM node:14.15.4-alpine


#create destination directory
RUN mkdir -p /twin_login/app
WORKDIR /app

COPY package*.json ./app

#update and install dependency
RUN apk update && apk upgrade
RUN apk add git
RUN apk add python3

#copy the app, note .dockerignore
COPY . .
COPY . /app
RUN npm install

#build necessary, even if no static files are needed,
RUN node -v
RUN npm -v

#set app serving to permissive / assigned
ENV HOST 0.0.0.0

#expose 8000 on container
EXPOSE 8000

CMD ["npm", "start"]

Docker-compose.yml

    version: '3'
services:
  web:
    build: .
    ports:
      - 8000:3000
    volumes:
      - ./twin_login:/app
    stdin_open: true
    tty: true
    networks:
      - twin_login

networks:
  twin_login:
    external: true

.dockerignore

node_modules
.gitignore
.nuxt

Error this is the error i am getting

WARN[0000] Found orphan containers ([twin_management_screen_nuxt_1 twin_management_screen_nuxt_run_2d8fca86d2ca twin_management_screen_nuxt_run_6d5ee3c9b0ba twin_management_screen_nuxt_run_881e46ae1ad1 twin_management_screen_nuxt_run_5089871620b5]) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

The error you found is not an error, just a warning (thus WARN[0000]) that you have orphaned containers that you should clean up with --remove-orphans (because they take up a lot of space on your system).

Check the syntax of your yml file and possibly also the Dockerfile, indentation is strict.

It can look as though you forgot the "run" part of your start CMD.

A tip is to do as little as possible in the Dockerfile and most of the stuff in docker-compose. This is the minimum stuff you need in your Dockerfile:

FROM node:xxx.xxx
ENV NODE_ENV=dev
WORKDIR /
COPY ./package*.json ./
RUN npm install
COPY . .
EXPOSE 8080 #or other
CMD ["npm", "run", "start"]
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