1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-18 12:49:43 +02:00

Improvements for docker build process (#237)

This commit is contained in:
Aliaksandr Shulyak 2022-05-04 14:04:19 -05:00 committed by GitHub
parent a30c6c5eea
commit cdcf00e339
5 changed files with 80 additions and 33 deletions

View file

@ -10,47 +10,19 @@ RUN npm install npm@latest --global \
COPY client .
RUN npm run build
FROM node:lts-alpine
FROM ghcr.io/plankanban/planka:base-latest
WORKDIR /app
COPY server/.npmrc server/package.json server/package-lock.json ./
ARG ALPINE_VERSION=3.15
ARG VIPS_VERSION=8.12.2
RUN apk -U upgrade \
&& apk add \
bash giflib glib lcms2 libexif \
libgsf libjpeg-turbo libpng librsvg libwebp \
orc pango tiff \
--repository https://alpine.global.ssl.fastly.net/alpine/v${ALPINE_VERSION}/community/ \
--repository https://alpine.global.ssl.fastly.net/alpine/v${ALPINE_VERSION}/main/ \
--no-cache \
&& apk add \
build-base giflib-dev glib-dev lcms2-dev libexif-dev \
libgsf-dev libjpeg-turbo-dev libpng-dev librsvg-dev libwebp-dev \
orc-dev pango-dev tiff-dev \
--virtual vips-dependencies \
--repository https://alpine.global.ssl.fastly.net/alpine/v${ALPINE_VERSION}/community/ \
--repository https://alpine.global.ssl.fastly.net/alpine/v${ALPINE_VERSION}/main/ \
--no-cache \
&& wget -O- https://github.com/libvips/libvips/releases/download/v${VIPS_VERSION}/vips-${VIPS_VERSION}.tar.gz | tar xzC /tmp \
&& cd /tmp/vips-${VIPS_VERSION} \
&& ./configure \
&& make \
&& make install-strip \
&& cd $OLDPWD \
&& rm -rf /tmp/vips-${VIPS_VERSION} \
&& npm install npm@latest --global \
&& npm install --production \
&& apk del vips-dependencies --purge
RUN npm install npm@latest --global \
&& npm install --production
COPY docker-start.sh start.sh
COPY server .
RUN chmod +x start.sh \
&& cp .env.sample .env
RUN cp .env.sample .env
COPY --from=client-builder /app/build public
COPY --from=client-builder /app/build/index.html views