Reverting dockerfiles since they seem to be causing issues for people
This commit is contained in:
parent
ad87722fd2
commit
e6e1ca61d3
4 changed files with 104 additions and 61 deletions
|
@ -1,9 +1,57 @@
|
|||
# syntax = edrevo/dockerfile-plus
|
||||
# Docker/Kubernetes file for running the image API
|
||||
|
||||
FROM node:alpine
|
||||
|
||||
INCLUDE+ Dockerfile.base
|
||||
RUN apk --no-cache upgrade
|
||||
RUN apk add --no-cache git msttcorefonts-installer python3 alpine-sdk ffmpeg \
|
||||
zlib-dev libpng-dev libjpeg-turbo-dev freetype-dev fontconfig-dev \
|
||||
libtool libwebp-dev libxml2-dev pango-dev freetype fontconfig \
|
||||
vips vips-dev
|
||||
|
||||
# liblqr needs to be built manually for magick to work
|
||||
# and because alpine doesn't have it in their repos
|
||||
RUN git clone https://github.com/carlobaldassi/liblqr \
|
||||
&& cd liblqr \
|
||||
&& ./configure \
|
||||
&& make \
|
||||
&& make install
|
||||
|
||||
# install imagemagick from source rather than using the package
|
||||
# since the alpine package does not include pango support.
|
||||
RUN git clone https://github.com/ImageMagick/ImageMagick.git ImageMagick \
|
||||
&& cd ImageMagick \
|
||||
&& ./configure \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--mandir=/usr/share/man \
|
||||
--infodir=/usr/share/info \
|
||||
--enable-static \
|
||||
--disable-openmp \
|
||||
--with-threads \
|
||||
--with-png \
|
||||
--with-webp \
|
||||
--with-modules \
|
||||
--with-pango \
|
||||
--without-hdri \
|
||||
--with-lqr \
|
||||
&& make \
|
||||
&& make install
|
||||
|
||||
RUN update-ms-fonts && fc-cache -f
|
||||
|
||||
RUN adduser esmBot -s /bin/sh -D
|
||||
WORKDIR /home/esmBot/.internal
|
||||
|
||||
COPY ./assets/caption.otf /usr/share/fonts/caption.otf
|
||||
COPY ./assets/caption2.ttf /usr/share/fonts/caption2.ttf
|
||||
COPY ./assets/hbc.ttf /usr/share/fonts/hbc.ttf
|
||||
COPY ./assets/reddit.ttf /usr/share/fonts/reddit.ttf
|
||||
RUN fc-cache -fv
|
||||
|
||||
COPY --chown=node:node ./package.json package.json
|
||||
COPY --chown=node:node ./package-lock.json package-lock.json
|
||||
RUN npm install
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
USER esmBot
|
||||
|
||||
|
|
|
@ -1,53 +0,0 @@
|
|||
FROM node:alpine
|
||||
|
||||
RUN apk --no-cache upgrade
|
||||
RUN apk add --no-cache git msttcorefonts-installer python3 alpine-sdk ffmpeg \
|
||||
zlib-dev libpng-dev libjpeg-turbo-dev freetype-dev fontconfig-dev \
|
||||
libtool libwebp-dev libxml2-dev pango-dev freetype fontconfig \
|
||||
vips vips-dev
|
||||
|
||||
# liblqr needs to be built manually for magick to work
|
||||
# and because alpine doesn't have it in their repos
|
||||
RUN git clone https://github.com/carlobaldassi/liblqr \
|
||||
&& cd liblqr \
|
||||
&& ./configure \
|
||||
&& make \
|
||||
&& make install
|
||||
|
||||
# install imagemagick from source rather than using the package
|
||||
# since the alpine package does not include pango support.
|
||||
RUN git clone https://github.com/ImageMagick/ImageMagick.git ImageMagick \
|
||||
&& cd ImageMagick \
|
||||
&& ./configure \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--mandir=/usr/share/man \
|
||||
--infodir=/usr/share/info \
|
||||
--enable-static \
|
||||
--disable-openmp \
|
||||
--with-threads \
|
||||
--with-png \
|
||||
--with-webp \
|
||||
--with-modules \
|
||||
--with-pango \
|
||||
--without-hdri \
|
||||
--with-lqr \
|
||||
&& make \
|
||||
&& make install
|
||||
|
||||
RUN update-ms-fonts && fc-cache -f
|
||||
|
||||
RUN adduser esmBot -s /bin/sh -D
|
||||
WORKDIR /home/esmBot/.internal
|
||||
|
||||
COPY ./assets/caption.otf /usr/share/fonts/caption.otf
|
||||
COPY ./assets/caption2.ttf /usr/share/fonts/caption2.ttf
|
||||
COPY ./assets/hbc.ttf /usr/share/fonts/hbc.ttf
|
||||
COPY ./assets/reddit.ttf /usr/share/fonts/reddit.ttf
|
||||
RUN fc-cache -fv
|
||||
|
||||
COPY --chown=node:node ./package.json package.json
|
||||
COPY --chown=node:node ./package-lock.json package-lock.json
|
||||
RUN npm install
|
||||
COPY . .
|
||||
RUN npm run build
|
|
@ -1,9 +1,57 @@
|
|||
# syntax = edrevo/dockerfile-plus
|
||||
# Docker/Kubernetes file for running the bot
|
||||
|
||||
FROM node:alpine
|
||||
|
||||
INCLUDE+ Dockerfile.base
|
||||
RUN apk --no-cache upgrade
|
||||
RUN apk add --no-cache git msttcorefonts-installer python3 alpine-sdk ffmpeg \
|
||||
zlib-dev libpng-dev libjpeg-turbo-dev freetype-dev fontconfig-dev \
|
||||
libtool libwebp-dev libxml2-dev pango-dev freetype fontconfig \
|
||||
vips vips-dev
|
||||
|
||||
# liblqr needs to be built manually for magick to work
|
||||
# and because alpine doesn't have it in their repos
|
||||
RUN git clone https://github.com/carlobaldassi/liblqr \
|
||||
&& cd liblqr \
|
||||
&& ./configure \
|
||||
&& make \
|
||||
&& make install
|
||||
|
||||
# install imagemagick from source rather than using the package
|
||||
# since the alpine package does not include pango support.
|
||||
RUN git clone https://github.com/ImageMagick/ImageMagick.git ImageMagick \
|
||||
&& cd ImageMagick \
|
||||
&& ./configure \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--mandir=/usr/share/man \
|
||||
--infodir=/usr/share/info \
|
||||
--enable-static \
|
||||
--disable-openmp \
|
||||
--with-threads \
|
||||
--with-png \
|
||||
--with-webp \
|
||||
--with-modules \
|
||||
--with-pango \
|
||||
--without-hdri \
|
||||
--with-lqr \
|
||||
&& make \
|
||||
&& make install
|
||||
|
||||
RUN update-ms-fonts && fc-cache -f
|
||||
|
||||
RUN adduser esmBot -s /bin/sh -D
|
||||
WORKDIR /home/esmBot/.internal
|
||||
|
||||
COPY ./assets/caption.otf /usr/share/fonts/caption.otf
|
||||
COPY ./assets/caption2.ttf /usr/share/fonts/caption2.ttf
|
||||
COPY ./assets/hbc.ttf /usr/share/fonts/hbc.ttf
|
||||
COPY ./assets/reddit.ttf /usr/share/fonts/reddit.ttf
|
||||
RUN fc-cache -fv
|
||||
|
||||
COPY --chown=node:node ./package.json package.json
|
||||
COPY --chown=node:node ./package-lock.json package-lock.json
|
||||
RUN npm install
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
USER esmBot
|
||||
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
},
|
||||
"scripts": {
|
||||
"build": "node-gyp configure build -j max",
|
||||
"docker:build": "DOCKER_BUILDKIT=1 docker build -t esmbot -f Dockerfile.bot .",
|
||||
"docker:build-api": "DOCKER_BUILDKIT=1 docker build -t esmbot-api -f Dockerfile.api .",
|
||||
"docker:build": "docker build -t esmbot -f Dockerfile.bot .",
|
||||
"docker:build-api": "docker build -t esmbot-api -f Dockerfile.api .",
|
||||
"docker:build-ss": "docker build -t headless-chrome-alpine --no-cache ./utils/screenshot",
|
||||
"docker:run-bot": "docker run --rm --network=host esmbot",
|
||||
"docker:run-api": "docker run --rm --network=host esmbot-api",
|
||||
|
|
Loading…
Reference in a new issue