finally update dockerfile to a working one! uses 6gb of ram to build btw. image size: 2.4gb, ~200mb when running
This commit is contained in:
parent
860d2ad2f6
commit
324c08ef43
2 changed files with 16 additions and 5 deletions
|
|
@ -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
Dockerfile
19
Dockerfile
|
|
@ -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 pnpm@9.0.4
|
||||
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"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue