Skip to content

Commit

Permalink
Merge pull request #311 from infosiftr/mips
Browse files Browse the repository at this point in the history
Fix mips64le build errors
  • Loading branch information
tianon authored Jan 5, 2024
2 parents 40f9f14 + 9f8737b commit 0b2d09d
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 6 deletions.
36 changes: 34 additions & 2 deletions 5.0/bookworm/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 34 additions & 2 deletions 5.1/bookworm/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 34 additions & 2 deletions Dockerfile-debian.template
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,43 @@ RUN set -eux; \
ghostscript \
gsfonts \
imagemagick \
# grab gosu for easy step-down from root
gosu \
# grab tini for signal processing and zombie killing
tini \
; \
# allow imagemagick to use ghostscript for PDF -> PNG thumbnail conversion (4.1+)
sed -ri 's/(rights)="none" (pattern="PDF")/\1="read" \2/' /etc/ImageMagick-6/policy.xml; \
rm -rf /var/lib/apt/lists/*

# grab gosu for easy step-down from root
ENV GOSU_VERSION 1.17
RUN set -eux; \
\
savedAptMark="$(apt-mark showmanual)"; \
apt-get update; \
apt-get install -y --no-install-recommends \
gnupg \
; \
rm -rf /var/lib/apt/lists/*; \
\
dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"; \
wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch"; \
wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc"; \
export GNUPGHOME="$(mktemp -d)"; \
gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4; \
gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu; \
gpgconf --kill all; \
rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc; \
\
apt-mark auto '.*' > /dev/null; \
apt-mark manual $savedAptMark > /dev/null; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
\
# smoke test
chmod +x /usr/local/bin/gosu; \
gosu --version; \
gosu nobody true


ENV RAILS_ENV production
WORKDIR /usr/src/redmine

Expand Down Expand Up @@ -71,6 +99,8 @@ RUN set -eux; \
gcc \
libpq-dev \
libsqlite3-dev \
libxml2-dev \
libxslt-dev \
make \
patch \
pkgconf \
Expand All @@ -90,6 +120,8 @@ RUN set -eux; \
echo "$adapter:" >> ./config/database.yml; \
echo " adapter: $adapter" >> ./config/database.yml; \
done; \
# nokogiri's vendored libxml2 + libxslt do not build on mips64le, so use the apt packages when building
gosu redmine bundle config build.nokogiri --use-system-libraries; \
gosu redmine bundle install --jobs "$(nproc)"; \
rm ./config/database.yml; \
# fix permissions for running as an arbitrary user
Expand Down

0 comments on commit 0b2d09d

Please sign in to comment.