forked from Arquisoft/wiq_0
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
11 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,20 @@ | ||
# Usa una imagen oficial de Node.js como imagen base | ||
# Use an official Node.js runtime as a parent image | ||
FROM node:20 | ||
|
||
# Establece el directorio de trabajo en el contenedor | ||
# Set the working directory in the container | ||
WORKDIR /usr/src/userservice | ||
|
||
# Copia package.json y package-lock.json al directorio de trabajo | ||
# Copy package.json and package-lock.json to the working directory | ||
COPY package*.json ./ | ||
|
||
# Instala las dependencias de la aplicación | ||
RUN npm install --ignore-scripts | ||
# Install app dependencies | ||
RUN npm install | ||
|
||
# Copia el código fuente de la aplicación al directorio de trabajo | ||
# Copy the app source code to the working directory | ||
COPY . . | ||
|
||
# Cambia a un usuario no privilegiado | ||
RUN addgroup -S nonroot \ | ||
&& adduser -S nonroot -G nonroot | ||
USER nonroot | ||
|
||
# Expone el puerto en el que se ejecuta la aplicación | ||
# Expose the port the app runs on | ||
EXPOSE 8001 | ||
|
||
# Define el comando para ejecutar la aplicación | ||
# Define the command to run your app | ||
CMD ["node", "user-service.js"] |