forked from devtron-labs/notifier
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
26 lines (18 loc) · 679 Bytes
/
Copy pathDockerfile
File metadata and controls
26 lines (18 loc) · 679 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
FROM node AS builder
WORKDIR /app
COPY package.json .
RUN yarn install
COPY /. .
RUN yarn build-ts
FROM node:14.2.0
RUN groupadd -r devtron && useradd -r -g devtron devtron
ENV TINI_VERSION v0.18.0
RUN arch=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) && echo $arch && wget https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${arch} -O /tini
RUN chmod +x /tini
ENTRYPOINT ["/tini", "--"]
WORKDIR /app
COPY --from=builder --chown=devtron:devtron /app/dist/ ./
COPY --from=builder --chown=devtron:devtron /app/node_modules ./node_modules
COPY --from=builder --chown=devtron:devtron /app/config/ ./config/
USER devtron
CMD ["node","server.js"]