-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (22 loc) · 886 Bytes
/
Dockerfile
File metadata and controls
30 lines (22 loc) · 886 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
FROM node:20-alpine AS builder
RUN apk add --no-cache openssl-dev openssl-libs-static fontconfig font-dejavu \
python3 build-base g++ cairo-dev pango-dev giflib-dev librsvg-dev && \
mkdir -p /nh-discord
COPY package*.json /nh-discord/
RUN cd /nh-discord && \
npm install
# build the runtime image
FROM node:20-alpine
RUN apk add --no-cache openssl-dev openssl-libs-static fontconfig font-dejavu cairo-dev pango-dev giflib-dev librsvg-dev && \
mkdir -p /nh-discord
# copy built dependecies from builder stage
COPY --from=builder /nh-discord /nh-discord/
# copy the app files
COPY commands/ /nh-discord/commands/
COPY slash_commands/ /nh-discord/slash_commands/
COPY lib/ /nh-discord/lib/
COPY main.js /nh-discord/main.js
COPY charts.js /nh-discord/charts.js
COPY entry.sh /nh-discord/entry.sh
RUN chmod +x /nh-discord/entry.sh
ENTRYPOINT ["/nh-discord/entry.sh"]