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
|
# Imagem base
|
||||||
FROM node:16
|
FROM node:20-alpine
|
||||||
|
|
||||||
# Set the working directory to /app
|
# Diretório de trabalho
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Copy the package.json and package-lock.json to the working directory
|
# Copiar package.json e package-lock.json
|
||||||
COPY ./package*.json ./
|
COPY package*.json ./
|
||||||
|
|
||||||
# Install the dependencies
|
# Instalar dependências
|
||||||
RUN npm install
|
RUN npm install
|
||||||
|
|
||||||
# Copy the remaining application files to the working directory
|
# Copiar todo o resto do código
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# Build the application
|
# Expor a porta que o Vite usa
|
||||||
RUN npm run build
|
EXPOSE 5173
|
||||||
|
|
||||||
# Expose port 3000 for the application
|
# Comando para iniciar em modo de desenvolvimento
|
||||||
EXPOSE 3000
|
CMD ["npm", "run", "dev", "--", "--host"]
|
||||||
|
|
||||||
# Start the application
|
|
||||||
CMD [ "npm", "run", "start" ]
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user