-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: build docker container from ordhook
- Loading branch information
Showing
1 changed file
with
7 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |