Skip to content

Commit

Permalink
feat: build docker container from ordhook
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelcr committed Oct 13, 2023
1 parent a299889 commit cd17f60
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
FROM node:18-alpine
FROM hirosystems/ordhook:latest

WORKDIR /app
COPY . .

RUN apk add --no-cache --virtual .build-deps git
RUN apt-get update && apt-get install -y ca-certificates curl gnupg git
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /tmp/nodesource.gpg
ENV NODE_MAJOR 18
RUN echo "deb [signed-by=/tmp/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
RUN apt-get update && apt-get install nodejs -y

RUN npm ci && \
npm run build && \
npm run generate:git-info && \
npm prune --production
RUN apk del .build-deps

CMD ["node", "./dist/src/index.js"]

0 comments on commit cd17f60

Please sign in to comment.