Improved Dockerfile performance + added java dependency (#768)

* Added Java dependency to Dockerfile

* Improved Dockerfile performance

Co-authored-by: hrosseel <hannesrosseel@gmail.com>
This commit is contained in:
Hannes 2020-10-06 14:47:46 +02:00 committed by GitHub
parent cdf0f0de76
commit d5726b95fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 20 additions and 19 deletions

View File

@ -1,30 +1,31 @@
FROM node:12 as base
EXPOSE 3001 3005
WORKDIR /shapez.io
COPY . .
EXPOSE 3005
EXPOSE 3001
RUN apt-get update \
&& apt-get update \
&& apt-get upgrade -y \
&& apt-get dist-upgrade -y \
&& apt-get install -y --no-install-recommends \
ffmpeg \
RUN apt-get update && apt-get install -y --no-install-recommends \
ffmpeg default-jre \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
FROM base as shape_base
COPY package.json yarn.lock ./
RUN yarn
COPY gulp ./gulp
WORKDIR /shapez.io/gulp
RUN yarn
WORKDIR /shapez.io
RUN yarn
COPY res ./res
COPY src/html ./src/html
COPY src/css ./src/css
COPY version ./version
COPY sync-translations.js ./
COPY translations ./translations
COPY src/js ./src/js
COPY res_raw ./res_raw
COPY .git ./.git
WORKDIR /shapez.io/gulp
RUN yarn
WORKDIR /shapez.io/gulp
ENTRYPOINT ["yarn", "gulp"]