Skip to content

Commit

Permalink
finally update dockerfile to a working one! uses 6gb of ram to build …
Browse files Browse the repository at this point in the history
…btw. image size: 2.4gb, ~200mb when running
  • Loading branch information
zardoy committed Jul 6, 2024
1 parent 860d2ad commit 324c08e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
2 changes: 0 additions & 2 deletions .dockerignore
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
19 changes: 16 additions & 3 deletions Dockerfile
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"]

0 comments on commit 324c08e

Please sign in to comment.