Files
gateway/Dockerfile
T
2024-01-05 20:39:04 +05:30

28 lines
512 B
Docker

# Use an official Node.js runtime as a parent image
FROM node:20-alpine
# Set the working directory in the container
WORKDIR /app
# Copy package.json and package-lock.json to the working directory
COPY package*.json ./
# Install app dependencies
RUN npm install
COPY ./ ./
RUN npm run build \
&& rm -rf node_modules \
&& npm install --production
# Bundle app source
COPY . .
# Expose the port your app runs on
EXPOSE 8787
ENTRYPOINT ["npm"]
# Define the command to run your app
CMD ["run", "start:node"]