More docker fixes
This commit is contained in:
parent
0614f41323
commit
67a7a71547
2 changed files with 17 additions and 35 deletions
|
@ -4,10 +4,8 @@ FROM node:alpine
|
||||||
|
|
||||||
RUN apk --no-cache upgrade
|
RUN apk --no-cache upgrade
|
||||||
RUN apk add --no-cache git msttcorefonts-installer python3 alpine-sdk ffmpeg \
|
RUN apk add --no-cache git msttcorefonts-installer python3 alpine-sdk ffmpeg \
|
||||||
zlib-dev libpng-dev libjpeg-turbo-dev freetype-dev fontconfig-dev perl-dev \
|
zlib-dev libpng-dev libjpeg-turbo-dev freetype-dev fontconfig-dev \
|
||||||
ghostscript-dev libtool tiff-dev lcms2-dev libwebp-dev libxml2-dev libx11-dev \
|
libtool libwebp-dev libxml2-dev pango-dev freetype fontconfig
|
||||||
libxext-dev chrpath libheif-dev pango-dev freetype fontconfig ghostscript \
|
|
||||||
ghostscript-fonts lcms2 graphviz
|
|
||||||
|
|
||||||
# install imagemagick from source rather than using the package
|
# install imagemagick from source rather than using the package
|
||||||
# since the alpine package does not include pango support.
|
# since the alpine package does not include pango support.
|
||||||
|
@ -22,18 +20,11 @@ RUN git clone https://github.com/ImageMagick/ImageMagick.git ImageMagick \
|
||||||
--enable-static \
|
--enable-static \
|
||||||
--disable-openmp \
|
--disable-openmp \
|
||||||
--with-threads \
|
--with-threads \
|
||||||
--with-x \
|
|
||||||
--with-tiff \
|
|
||||||
--with-png \
|
--with-png \
|
||||||
--with-webp \
|
--with-webp \
|
||||||
--with-gslib \
|
|
||||||
--with-gs-font-dir=/usr/share/fonts/Type1 \
|
|
||||||
--with-heic \
|
|
||||||
--with-modules \
|
--with-modules \
|
||||||
--with-xml \
|
|
||||||
--with-perl \
|
|
||||||
--with-perl-options="PREFIX=/usr INSTALLDIRS=vendor" \
|
|
||||||
--with-pango \
|
--with-pango \
|
||||||
|
--without-hdri \
|
||||||
&& make \
|
&& make \
|
||||||
&& sudo make install
|
&& sudo make install
|
||||||
|
|
||||||
|
@ -42,13 +33,13 @@ RUN update-ms-fonts && fc-cache -f
|
||||||
RUN adduser esmBot -s /bin/sh -D
|
RUN adduser esmBot -s /bin/sh -D
|
||||||
WORKDIR /home/esmBot/.internal
|
WORKDIR /home/esmBot/.internal
|
||||||
|
|
||||||
COPY ./assets/caption.otf /home/esmBot/.font/caption.otf
|
COPY ./assets/caption.otf /usr/share/fonts/caption.otf
|
||||||
COPY ./assets/caption2.ttf /home/esmBot/.font/caption2.ttf
|
COPY ./assets/caption2.ttf /usr/share/fonts/caption2.ttf
|
||||||
COPY ./assets/hbc.ttf /home/esmBot/.font/hbc.ttf
|
COPY ./assets/hbc.ttf /usr/share/fonts/hbc.ttf
|
||||||
RUN fc-cache -f
|
RUN fc-cache -fv
|
||||||
|
|
||||||
COPY ./package.json package.json
|
COPY --chown=node:node ./package.json package.json
|
||||||
COPY ./package-lock.json package-lock.json
|
COPY --chown=node:node ./package-lock.json package-lock.json
|
||||||
RUN npm install
|
RUN npm install
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
|
@ -4,10 +4,8 @@ FROM node:alpine
|
||||||
|
|
||||||
RUN apk --no-cache upgrade
|
RUN apk --no-cache upgrade
|
||||||
RUN apk add --no-cache git msttcorefonts-installer python3 alpine-sdk ffmpeg \
|
RUN apk add --no-cache git msttcorefonts-installer python3 alpine-sdk ffmpeg \
|
||||||
zlib-dev libpng-dev libjpeg-turbo-dev freetype-dev fontconfig-dev perl-dev \
|
zlib-dev libpng-dev libjpeg-turbo-dev freetype-dev fontconfig-dev \
|
||||||
ghostscript-dev libtool tiff-dev lcms2-dev libwebp-dev libxml2-dev libx11-dev \
|
libtool libwebp-dev libxml2-dev pango-dev freetype fontconfig
|
||||||
libxext-dev chrpath libheif-dev pango-dev freetype fontconfig ghostscript \
|
|
||||||
ghostscript-fonts lcms2 graphviz
|
|
||||||
|
|
||||||
# install imagemagick from source rather than using the package
|
# install imagemagick from source rather than using the package
|
||||||
# since the alpine package does not include pango support.
|
# since the alpine package does not include pango support.
|
||||||
|
@ -22,18 +20,11 @@ RUN git clone https://github.com/ImageMagick/ImageMagick.git ImageMagick \
|
||||||
--enable-static \
|
--enable-static \
|
||||||
--disable-openmp \
|
--disable-openmp \
|
||||||
--with-threads \
|
--with-threads \
|
||||||
--with-x \
|
|
||||||
--with-tiff \
|
|
||||||
--with-png \
|
--with-png \
|
||||||
--with-webp \
|
--with-webp \
|
||||||
--with-gslib \
|
|
||||||
--with-gs-font-dir=/usr/share/fonts/Type1 \
|
|
||||||
--with-heic \
|
|
||||||
--with-modules \
|
--with-modules \
|
||||||
--with-xml \
|
|
||||||
--with-perl \
|
|
||||||
--with-perl-options="PREFIX=/usr INSTALLDIRS=vendor" \
|
|
||||||
--with-pango \
|
--with-pango \
|
||||||
|
--without-hdri \
|
||||||
&& make \
|
&& make \
|
||||||
&& sudo make install
|
&& sudo make install
|
||||||
|
|
||||||
|
@ -42,16 +33,16 @@ RUN update-ms-fonts && fc-cache -f
|
||||||
RUN adduser esmBot -s /bin/sh -D
|
RUN adduser esmBot -s /bin/sh -D
|
||||||
WORKDIR /home/esmBot/.internal
|
WORKDIR /home/esmBot/.internal
|
||||||
|
|
||||||
COPY ./assets/caption.otf /home/esmBot/.font/caption.otf
|
COPY ./assets/caption.otf /usr/share/fonts/caption.otf
|
||||||
COPY ./assets/caption2.ttf /home/esmBot/.font/caption2.ttf
|
COPY ./assets/caption2.ttf /usr/share/fonts/caption2.ttf
|
||||||
COPY ./assets/hbc.ttf /home/esmBot/.font/hbc.ttf
|
COPY ./assets/hbc.ttf /usr/share/fonts/hbc.ttf
|
||||||
RUN fc-cache -f
|
RUN fc-cache -fv
|
||||||
|
|
||||||
COPY --chown=node:node ./package.json package.json
|
COPY --chown=node:node ./package.json package.json
|
||||||
COPY --chown=node:node ./package-lock.json package-lock.json
|
COPY --chown=node:node ./package-lock.json package-lock.json
|
||||||
RUN npm install
|
RUN npm install
|
||||||
RUN npm run build
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
RUN npm run build
|
||||||
USER esmBot
|
USER esmBot
|
||||||
|
|
||||||
ENTRYPOINT ["node", "app.js"]
|
ENTRYPOINT ["node", "app.js"]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue