-
Notifications
You must be signed in to change notification settings - Fork 25
/
Dockerfile.base
48 lines (39 loc) · 2.08 KB
/
Dockerfile.base
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
FROM phusion/passenger-ruby33:latest AS base
ARG MAKE_JOBS=3
# From Phusion
ENV HOME /root
RUN rm /etc/nginx/sites-enabled/default
ADD config/docker/nginx/gzip_max.conf /etc/nginx/conf.d/gzip_max.conf
# TaxonWorks dependencies
COPY exe/install-imagemagick7.sh /usr/local/bin
RUN echo "deb https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list && \
curl -sL https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && \
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" > /etc/apt/sources.list.d/nodesource.list && \
apt update && apt-get install -y locales software-properties-common \
postgresql-client-15 \
build-essential autoconf libtool git-core jq \
libffi-dev libgdbm-dev libncurses5-dev libreadline-dev libssl-dev libyaml-dev zlib1g-dev libcurl4-openssl-dev \
pkg-config poppler-utils \
libpq-dev libproj-dev libgeos-dev libgeos++-dev \
tesseract-ocr \
cmake \
zip \
nodejs \
redis-server libhiredis-dev && \
/usr/local/bin/install-imagemagick7.sh && \
apt-get autoremove -y && apt clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/src/*
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
RUN echo 'gem: --no-rdoc --no-ri >> "$HOME/.gemrc"'
RUN gem update --system
RUN gem install bundler
FROM ubuntu:22.04 AS imagemagick
RUN apt-get update && apt-get install -y imagemagick
FROM base
COPY --from=imagemagick /etc/ImageMagick-6 /usr/local/etc/ImageMagick-7
# Set up ImageMagick
RUN sed -i 's/name="disk" value="1GiB"/name="disk" value="8GiB"/' /usr/local/etc/ImageMagick-7/policy.xml && \
identify -list resource | grep Disk | grep 8GiB && magick -list format | grep "HEIC rw+" # Confirm HEIC support and that 8GB disk setting is active