Modificar Dockerfile
This commit is contained in:
parent
ec253c92b3
commit
f2d4f42367
25
Dockerfile
25
Dockerfile
@ -1,23 +1,20 @@
|
||||
# Use an official Node runtime as a parent image
|
||||
FROM node:16
|
||||
# Imagem base
|
||||
FROM node:20-alpine
|
||||
|
||||
# Set the working directory to /app
|
||||
# Diretório de trabalho
|
||||
WORKDIR /app
|
||||
|
||||
# Copy the package.json and package-lock.json to the working directory
|
||||
COPY ./package*.json ./
|
||||
# Copiar package.json e package-lock.json
|
||||
COPY package*.json ./
|
||||
|
||||
# Install the dependencies
|
||||
# Instalar dependências
|
||||
RUN npm install
|
||||
|
||||
# Copy the remaining application files to the working directory
|
||||
# Copiar todo o resto do código
|
||||
COPY . .
|
||||
|
||||
# Build the application
|
||||
RUN npm run build
|
||||
# Expor a porta que o Vite usa
|
||||
EXPOSE 5173
|
||||
|
||||
# Expose port 3000 for the application
|
||||
EXPOSE 3000
|
||||
|
||||
# Start the application
|
||||
CMD [ "npm", "run", "start" ]
|
||||
# Comando para iniciar em modo de desenvolvimento
|
||||
CMD ["npm", "run", "dev", "--", "--host"]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user