Skip to content

Commit

Permalink
refactor: reduce number of layers
Browse files Browse the repository at this point in the history
  • Loading branch information
martabal committed Oct 12, 2023
1 parent ab0b52a commit 1ad47d0
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 14 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
branches: [main]
release:
types: [published]
schedule:
- cron: "0 0 */3 * *"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
50 changes: 36 additions & 14 deletions server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,40 @@ FROM node:20.8-bookworm

WORKDIR /usr/src/app

COPY bin/install-ffmpeg.sh build-lock.json ./
RUN sed -i -e's/ main/ main contrib non-free non-free-firmware/g' /etc/apt/sources.list.d/debian.sources
RUN apt-get update && apt-get install -yqq build-essential ninja-build meson pkg-config jq zlib1g autoconf \
libglib2.0-dev libexpat1-dev librsvg2-dev libexif-dev libwebp-dev liborc-0.4-dev \
libjpeg62-turbo-dev libgsf-1-dev libspng-dev libjxl-dev libheif-dev liblcms2-2 \
mesa-va-drivers libmimalloc2.0 $(if [ $(arch) = "x86_64" ]; then echo "intel-media-va-driver-non-free"; fi) \
&& ./install-ffmpeg.sh && apt-get autoremove && apt-get clean && rm -rf /var/lib/apt/lists/*
ENV LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH \
LD_RUN_PATH=/usr/local/lib:$LD_RUN_PATH

# debian build for imagemagick has broken RAW support, so build manually
ENV LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
ENV LD_RUN_PATH=/usr/local/lib:$LD_RUN_PATH
COPY bin/build-libraw.sh bin/build-imagemagick.sh bin/build-libvips.sh bin/use-camera-wb.patch ./
RUN ./build-libraw.sh
RUN ./build-imagemagick.sh
RUN ./build-libvips.sh
COPY bin/* build-lock.json .

RUN sed -i -e's/ main/ main contrib non-free non-free-firmware/g' /etc/apt/sources.list.d/debian.sources &&
apt-get update &&
apt-get install -yqq \
autoconf \
build-essential \
jq \
libexif-dev \
libexpat1-dev \
libglib2.0-dev \
libgsf-1-dev \
libheif-dev \
libjpeg62-turbo-dev \
libjxl-dev \
liblcms2-2 \
liborc-0.4-dev \
librsvg2-dev \
libspng-dev \
libwebp-dev \
mesa-va-drivers \
meson \
ninja-build \
libmimalloc2.0 \
pkg-config \
zlib1g \
$(if [ $(arch) = "x86_64" ]; then echo "intel-media-va-driver-non-free"; fi) &&
./install-ffmpeg.sh &&
apt-get autoremove &&
apt-get clean &&
rm -rf /var/lib/apt/lists/* &&
./build-libraw.sh &&
./build-imagemagick.sh &&
./build-libvips.sh

0 comments on commit 1ad47d0

Please sign in to comment.