Correct Build and file name sanitization

This commit is contained in:
Allan Carr
2024-08-28 09:34:56 -07:00
parent 36ada6fd1f
commit a6da3c369a
4 changed files with 42 additions and 26 deletions

View File

@@ -15,8 +15,8 @@ RUN npm install
# Bundle app source
COPY . .
RUN apt-get -y update
RUN apt install wget
RUN apt -y update
RUN apt install -y wget
# PNG ,JPG ,Tiff & WebP support
# Consider adding more support with testing https://gist.github.com/hurricup/e14ae5bc47705fca6b1680e7a1fb6580
@@ -26,21 +26,32 @@ RUN apt install -y libtiff-dev
RUN apt install -y libwebp-dev
# Install HEIF support (libheic-dev Package does not exist on 16.04)
RUN apt-get -y install libde265-dev
RUN apt-get -y install pkg-config m4 libtool automake autoconf
RUN apt -y install libde265-dev
RUN apt -y install pkg-config m4 libtool automake autoconf cmake
RUN wget https://github.com/strukturag/libde265/archive/v1.0.15.tar.gz
RUN tar -xvf v1.0.15.tar.gz
WORKDIR /usr/src/app/libde265-1.0.15/
RUN cmake .
RUN make
RUN make install
RUN ./autogen.sh
RUN ./configure
WORKDIR /usr/src/app
RUN wget https://github.com/strukturag/libheif/archive/v1.18.2.tar.gz
RUN tar -xvf v1.18.2.tar.gz
WORKDIR /usr/src/app/libheif-1.18.2/
RUN ./autogen.sh
RUN ./configure
RUN cmake --preset=release .
RUN make
RUN make install
WORKDIR /usr/src/app
# Install ruby 2.3.0 for ImageMagick
RUN apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev
RUN apt-get -y install wget && apt-get install -y ruby-full && ruby -v
RUN apt -y install -y build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev
RUN apt -y install -y ruby-full && ruby -v
# Install ImageMagick
# RUN apt-get install imagemagick -y
@@ -56,9 +67,7 @@ RUN ldconfig /usr/local/lib
RUN identify --version
RUN apt-get update && apt-get install -y \
ghostscript \
graphicsmagick \
RUN apt update && apt install -y ghostscript graphicsmagick \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /usr/src/app
@@ -67,4 +76,4 @@ RUN npm run build
RUN npm install pm2 -g
EXPOSE 8000
CMD [ "pm2-runtime", "ecosystem.config.js" ]
CMD [ "pm2-runtime", "ecosystem.config.cjs" ]