forked from yGuy/chatgpt-mattermost-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
27 lines (19 loc) · 588 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
# NPM builder image
FROM node:16-alpine as npm_builder
WORKDIR /app
COPY [ "package.json", "package-lock.json", "tsconfig.json", "./"]
COPY [ "src/", "./src/" ]
RUN npm ci --omit dev
RUN npm run build
# NPM runtime image
FROM node:16-alpine as npm_runtime
WORKDIR /app
ARG NODE_ENV=production
ENV NODE_ENV $NODE_ENV
ENV PLUGINS=image-plugin,graph-plugin
# Avoid running as root:
USER node
COPY --from=npm_builder [ "/app/node_modules/", "./node_modules/" ]
COPY --from=npm_builder [ "/app/dist/", "./src/" ]
COPY [ "./license.md", "./" ]
ENTRYPOINT [ "node", "src/botservice.js" ]