forked from snapshot-labs/snapshot-hub
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (25 loc) · 738 Bytes
/
Copy pathDockerfile
File metadata and controls
35 lines (25 loc) · 738 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
# Node version matching the version declared in the package.json
FROM node:22.6.0-slim
# Update O.S.
RUN apt-get update && apt-get upgrade -y
# Install required O.S. packages
RUN apt-get install -y git python3 make g++
# Create the application workdir
RUN mkdir -p /home/node/app && chown -R node:node /home/node/app
RUN mkdir -p /home/node/app/uploads && chown -R node:node /home/node/app/uploads
WORKDIR /home/node/app
# Set current user
USER node
# Copy app dependencies
COPY package*.json ./
COPY renovate*.json ./
# Install app dependencies
RUN yarn
# Bundle app source
COPY --chown=node:node . .
# Set the container port
EXPOSE 8080
# Build the app
RUN yarn run build
# Start the application
CMD ["yarn", "run", "start" ]