Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20
17 changes: 6 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,21 @@
FROM node AS builder
FROM node:20

WORKDIR /app
COPY package.json .
RUN yarn install
COPY package-lock.json .

COPY /. .
RUN yarn build-ts
RUN npm install

FROM node:14.2.0
COPY /. .
RUN npm run build-ts

RUN groupadd -r devtron && useradd -r -g devtron devtron

ENV TINI_VERSION v0.18.0
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"]
Loading