forked from PrismarineJS/prismarine-web-client
-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
finally update dockerfile to a working one! uses 6gb of ram to build …
…btw. image size: 2.4gb, ~200mb when running
- Loading branch information
Showing
2 changed files
with
16 additions
and
5 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,5 +1,3 @@ | ||
# we dont want default config to be loaded in the dockerfile, but rather using a volume | ||
config.json | ||
# build stuff | ||
node_modules | ||
public |
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,22 @@ | ||
FROM node:14-alpine | ||
FROM node:18-alpine | ||
# Without git installing the npm packages fails | ||
RUN apk add git | ||
RUN mkdir /app | ||
WORKDIR /app | ||
COPY . /app | ||
RUN npm install | ||
RUN npm run build | ||
# install python and other dependencies | ||
RUN apk add python3 make g++ cairo-dev pango-dev jpeg-dev giflib-dev librsvg-dev | ||
# install pnpm | ||
RUN npm i -g [email protected] | ||
RUN pnpm install | ||
# only for prod | ||
RUN pnpm run build | ||
# --- | ||
EXPOSE 8080 | ||
# uncomment for development | ||
# EXPOSE 9090 | ||
# VOLUME /app/src | ||
# VOLUME /app/prismarine-viewer | ||
# ENTRYPOINT ["pnpm", "run", "run-all"] | ||
# only for prod | ||
ENTRYPOINT ["npm", "run", "prod-start"] |