Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
ann125697 committed Feb 21, 2024
1 parent d45bbe3 commit db25c3d
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions Taipei-City-Dashboard-FE/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
FROM node:20.11.1-alpine3.19
# Use the official lightweight Node.js 18 image.
# https://hub.docker.com/_/node
FROM node:19-alpine

WORKDIR /opt/aipei-City-Dashboard-FE
# Create and change to the app directory.
WORKDIR /usr/src/app

COPY ./ ./
# Copy application dependency manifests to the container image.
# A wildcard is used to ensure both package.json AND package-lock.json are copied.
# Copying this separately prevents re-running npm install on every code change.
COPY package*.json ./

# Install dependencies.
# If you add a package-lock.json speed your build by switching to 'npm ci'.
RUN npm install

CMD ["npm", "start"]
# Copy local code to the container image.
COPY . ./

# Run the web service on container startup.
CMD ["npm", "run", "dev"]

0 comments on commit db25c3d

Please sign in to comment.