1- FROM ruby:3.4.2 -alpine AS download
1+ FROM ruby:4.0.1 -alpine AS download
22
33WORKDIR /fonts
44
@@ -9,14 +9,14 @@ RUN apk --no-cache add fontforge wget && \
99 wget https://cdn.jsdelivr.net/gh/notofonts/notofonts.github.io/fonts/NotoSansSymbols2/hinted/ttf/NotoSansSymbols2-Regular.ttf && \
1010 wget https://github.com/Maxattax97/gnu-freefont/raw/master/ttf/FreeSans.ttf && \
1111 wget https://github.com/impallari/DancingScript/raw/master/OFL.txt && \
12- wget -O /model.onnx "https://github.com/docusealco/fields-detection/releases/download/2.1 .0/model_704_int8.onnx" && \
12+ wget -O /model.onnx "https://github.com/docusealco/fields-detection/releases/download/2.0 .0/model_704_int8.onnx" && \
1313 wget -O pdfium-linux.tgz "https://github.com/docusealco/pdfium-binaries/releases/latest/download/pdfium-linux-$(uname -m | sed 's/x86_64/x64/;s/aarch64/arm64/').tgz" && \
1414 mkdir -p /pdfium-linux && \
1515 tar -xzf pdfium-linux.tgz -C /pdfium-linux
1616
1717RUN fontforge -lang=py -c 'font1 = fontforge.open("FreeSans.ttf"); font2 = fontforge.open("NotoSansSymbols2-Regular.ttf"); font1.mergeFonts(font2); font1.generate("FreeSans.ttf")'
1818
19- FROM ruby:3.4.2 -alpine AS webpack
19+ FROM ruby:4.0.1 -alpine AS webpack
2020
2121ENV RAILS_ENV=production
2222ENV NODE_ENV=production
@@ -42,7 +42,7 @@ COPY ./app/views ./app/views
4242
4343RUN echo "gem 'shakapacker'" > Gemfile && ./bin/shakapacker
4444
45- FROM ruby:3.4.2 -alpine AS app
45+ FROM ruby:4.0.1 -alpine AS app
4646
4747ENV RAILS_ENV=production
4848ENV BUNDLE_WITHOUT="development:test"
@@ -51,7 +51,7 @@ ENV OPENSSL_CONF=/etc/openssl_legacy.cnf
5151
5252WORKDIR /app
5353
54- RUN apk add --no-cache sqlite-dev libpq-dev mariadb-dev vips-dev yaml-dev redis libheif vips-heif gcompat ttf-freefont && mkdir /fonts && rm /usr/share/fonts/freefont/FreeSans.otf
54+ RUN apk add --no-cache sqlite-dev libpq-dev mariadb-dev vips-dev yaml-dev redis libheif vips-heif gcompat ttf-freefont onnxruntime && mkdir /fonts && rm /usr/share/fonts/freefont/FreeSans.otf
5555
5656RUN addgroup -g 2000 docuseal && adduser -u 2000 -G docuseal -s /bin/sh -D -h /home/docuseal docuseal
5757
@@ -71,8 +71,6 @@ COPY --chown=docuseal:docuseal ./Gemfile ./Gemfile.lock ./
7171
7272RUN apk add --no-cache build-base && bundle install && apk del --no-cache build-base && rm -rf ~/.bundle /usr/local/bundle/cache && ruby -e "puts Dir['/usr/local/bundle/**/{spec,rdoc,resources/shared,resources/collation,resources/locales}']" | xargs rm -rf && ln -sf /usr/lib/libonnxruntime.so.1 $(ruby -e "print Dir[Gem::Specification.find_by_name('onnxruntime').gem_dir + '/vendor/*.so'].first" )
7373
74- RUN echo 'https://dl-cdn.alpinelinux.org/alpine/edge/main' >> /etc/apk/repositories && echo 'https://dl-cdn.alpinelinux.org/alpine/edge/community' >> /etc/apk/repositories && apk add --no-cache onnxruntime
75-
7674COPY --chown=docuseal:docuseal ./bin ./bin
7775COPY --chown=docuseal:docuseal ./app ./app
7876COPY --chown=docuseal:docuseal ./config ./config
0 commit comments