Successful build but does it run?

This commit is contained in:
Matthew Raymer
2023-08-28 19:02:53 +08:00
parent 3aec2e76b0
commit f8ba67d526

View File

@@ -1,21 +1,18 @@
FROM node:18.17.1-alpine3.17 FROM node:18.17.1-alpine3.17
# Set the working directory inside the container
WORKDIR /usr/src/app WORKDIR /usr/src/app
# Copy package.json and package-lock.json into the container
COPY package*.json ./ COPY package*.json ./
COPY tsconfig.json ./
COPY .eslintrc.json ./
COPY src ./src
# Install app dependencies inside the container
RUN npm install RUN npm install
RUN npm run build RUN npm run build
# Copy the application code into the container
COPY . . COPY . .
# Expose port 3000 to interact with the application
EXPOSE 3000 EXPOSE 3000
# Define the command to run the application
CMD [ "npm", "start" ] CMD [ "npm", "start" ]