forked from titaniumnetwork-dev/Ultraviolet-App
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request titaniumnetwork-dev#15 from np22-jpg/main
Update Dockerfile
- Loading branch information
Showing
1 changed file
with
14 additions
and
4 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,9 +1,19 @@ | ||
FROM node:current-slim | ||
# build app | ||
FROM docker.io/node AS builder | ||
|
||
RUN apt update | ||
RUN apt install git | ||
|
||
COPY . /app | ||
WORKDIR /app | ||
|
||
COPY ./package.json ./package-lock.json ./src/ ./ | ||
RUN npm install | ||
|
||
# build final | ||
FROM gcr.io/distroless/nodejs:16 | ||
|
||
EXPOSE 8080/tcp | ||
|
||
RUN npm install --omit=dev | ||
COPY --from=builder /app / | ||
|
||
ENTRYPOINT npm start | ||
CMD ["src/index.js"] |