-
-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathDockerfile
More file actions
25 lines (17 loc) · 548 Bytes
/
Dockerfile
File metadata and controls
25 lines (17 loc) · 548 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
# Use the official lightweight Node.js image.
# https://hub.docker.com/_/node
FROM docker.io/node:current-slim
ENV NODE_ENV=production
ARG DEBIAN_FRONTEND="noninteractive"
RUN apt-get update -y \
&& apt-get install -y tini
WORKDIR /usr/src/app
RUN npm install -g npm@latest
COPY dist/apps/fetcher/package*.json ./
RUN npm ci --no-audit
COPY dist/apps/fetcher/main.js ./
ENTRYPOINT ["/usr/bin/tini", "--"]
RUN chown -R node:node .
USER node
# Restart the fetcher periodically to mitigate memory leaks.
CMD [ "node", "main.js", "-e", "240" ]