-
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.
Merge pull request #4 from tpc3/dockerfile-test
Changed base image to NodeCG official image
- Loading branch information
Showing
1 changed file
with
15 additions
and
7 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,8 +1,16 @@ | ||
FROM node:20-alpine | ||
# build phase | ||
FROM ghcr.io/nodecg/nodecg:2 AS build | ||
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true | ||
USER root | ||
RUN apt-get update \ | ||
&& apt-get install -y trash-cli | ||
COPY . /tpc3stream | ||
WORKDIR /tpc3stream | ||
RUN npm ci && npm run build | ||
|
||
# mount phase | ||
FROM ghcr.io/nodecg/nodecg:2 AS nodecg | ||
WORKDIR /opt/nodecg | ||
RUN apk add --no-cache git make gcc python3 musl-dev g++ trash-cli && npm install --global nodecg-cli && nodecg setup | ||
COPY . /opt/nodecg/bundles/tpc3stream/ | ||
WORKDIR /opt/nodecg/bundles/tpc3stream/ | ||
RUN npm i && npm run build && apk del git make gcc python3 musl-dev g++ trash-cli | ||
WORKDIR /opt/nodecg | ||
CMD ["node", "index.js"] | ||
USER nodecg | ||
COPY --chown=nodecg:nodecg --from=build /tpc3stream /opt/nodecg/bundles/tpc3stream | ||
CMD ["node", "/opt/nodecg/index.js"] |