forked from Skript-MC/Swan
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (24 loc) · 712 Bytes
/
Dockerfile
File metadata and controls
36 lines (24 loc) · 712 Bytes
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
32
33
34
35
36
FROM node:17-alpine3.14 AS build
# Defining the work directory
WORKDIR /app
# We're in a development environment
ENV NODE_ENV=development
# Copying package files and install dependencies
COPY package*.json ./
RUN ["npm", "install"]
# Copying all other files
COPY . .
# Creating a build output
RUN ["npm", "run", "build"]
FROM node:17-alpine3.14
# Defining the work directory
WORKDIR /app
# We're in a production environment
ENV NODE_ENV=production
# Copying package files and install dependencies
COPY package*.json ./
RUN ["npm", "install"]
# Copy build output and configurations
COPY --from=build /app/build ./build
# Defining the entry command
CMD ["node", "--no-warnings", "./build/src/main.js"]