-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(dockerfile): use new light wight docker file
- Loading branch information
Gerald Baulig
committed
Apr 11, 2024
1 parent
9947d96
commit 1e08edb
Showing
1 changed file
with
5 additions
and
15 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,39 +1,29 @@ | ||
### Build | ||
FROM node:20.11.1-alpine3.19 as build | ||
FROM node:20.8.0-alpine3.18 as build | ||
ENV NO_UPDATE_NOTIFIER=true | ||
|
||
USER node | ||
ARG APP_HOME=/home/node/srv | ||
WORKDIR $APP_HOME | ||
|
||
COPY package.json package.json | ||
COPY package-lock.json package-lock.json | ||
|
||
RUN npm ci | ||
|
||
COPY --chown=node:node . . | ||
|
||
RUN npm ci | ||
RUN npm run build | ||
|
||
|
||
### Deployment | ||
FROM node:20.11.1-alpine3.19 as deployment | ||
FROM node:20.8.0-alpine3.18 as deployment | ||
|
||
ENV NO_UPDATE_NOTIFIER=true | ||
|
||
USER node | ||
ARG APP_HOME=/home/node/srv | ||
WORKDIR $APP_HOME | ||
|
||
COPY package.json package.json | ||
COPY package-lock.json package-lock.json | ||
|
||
COPY --chown=node:node . $APP_HOME | ||
COPY --chown=node:node ./cfg $APP_HOME/cfg | ||
COPY --chown=node:node --from=build $APP_HOME/lib $APP_HOME/lib | ||
|
||
EXPOSE 50051 | ||
|
||
USER root | ||
USER node | ||
|
||
CMD [ "npm", "start" ] | ||
CMD [ "node", "./lib/start.cjs" ] |