forked from dojonode/taiko-node-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
31 lines (22 loc) · 770 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Use the official Node.js image as the base image
FROM node:21.1 AS Build
# Install pnpm
RUN npm install -g pnpm
# Set the working directory
WORKDIR /app
# Copy the package.json and pnpm-lock.yaml files into the container
COPY package.json pnpm-lock.yaml ./
# Install dependencies using pnpm
RUN pnpm install
# Copy the rest of the Svelte app into the container
COPY . .
# Build the Svelte app
RUN pnpm run build
# Use a lightweight Nginx image as the base image for the final image
FROM nginx:1.25.3
# Copy the built app from the Build stage to the Nginx web server
COPY --from=Build /app/dist /usr/share/nginx/html
# Expose port 80 so that the container can be accessed from the host
EXPOSE 80
# Start the Nginx web server
CMD ["nginx", "-g", "daemon off;"]