Skip to content

Commit

Permalink
hopefully fix arm builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Rdeisenroth committed Sep 11, 2024
1 parent 0a6d825 commit 3610fe0
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 14 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ out/

## Generated if empty string is given at "Please type another file name for output:"
**/.pdf
!**/tuda_logo.pdf

## Bibliography auxiliary files (bibtex/biblatex/biber):
**/*.bbl
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/docker-img.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build Dockerfile.logo
run: docker buildx build --output . -f Dockerfile.logo .

- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v5
Expand Down
16 changes: 2 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,11 @@
FROM archlinux:latest AS build
WORKDIR /logo
# Dependencies
RUN pacman -Sy --needed --noconfirm inkscape librsvg
# Build logo
RUN curl -O https://www.tu-darmstadt.de/media/medien_stabsstelle_km/services/medien_cd/das_bild_der_tu_darmstadt.pdf \
&& inkscape das_bild_der_tu_darmstadt.pdf --export-filename=p1_i.svg --export-dpi=300 --pages=1 \
&& sed -i 's/icc-color([^)]*)//g' p1_i.svg \
&& sed -i 's/#000000/#1d1d1bff/g' p1_i.svg \
&& rsvg-convert -f pdf -o tuda_logo.pdf p1_i.svg --export-id=g23 \
&& rm das_bild_der_tu_darmstadt.pdf p1_i.svg

FROM registry.gitlab.com/islandoftex/images/texlive:latest AS run
FROM registry.gitlab.com/islandoftex/images/texlive:latest
# Dependencies
RUN apt-get update && apt-get install -y librsvg2-bin nodejs imagemagick ghostscript inkscape
RUN sed -i "s/rights=\"none\" pattern=\"PDF\"/rights=\"read|write\" pattern=\"PDF\"/" /etc/ImageMagick-6/policy.xml
RUN sed -i "s/rights=\"none\" pattern=\"PS\"/rights=\"read|write\" pattern=\"PS\"/" /etc/ImageMagick-6/policy.xml
RUN sed -i "s/rights=\"none\" pattern=\"SVG\"/rights=\"read|write\" pattern=\"SVG\"/" /etc/ImageMagick-6/policy.xml
# Install logo
COPY --from=build /logo/tuda_logo.pdf .
COPY tuda_logo.pdf .
RUN mkdir -p "$(kpsewhich -var-value=TEXMFDIST)/tex/latex/local" \
&& mv tuda_logo.pdf "$(kpsewhich -var-value=TEXMFDIST)/tex/latex/local" \
&& texhash --verbose
Expand Down
14 changes: 14 additions & 0 deletions Dockerfile.logo
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM archlinux:latest AS build
WORKDIR /logo
# Dependencies
RUN pacman -Sy --needed --noconfirm inkscape librsvg
# Build logo
RUN curl -O https://www.tu-darmstadt.de/media/medien_stabsstelle_km/services/medien_cd/das_bild_der_tu_darmstadt.pdf \
&& inkscape das_bild_der_tu_darmstadt.pdf --export-filename=p1_i.svg --export-dpi=300 --pages=1 \
&& sed -i 's/icc-color([^)]*)//g' p1_i.svg \
&& sed -i 's/#000000/#1d1d1bff/g' p1_i.svg \
&& rsvg-convert -f pdf -o tuda_logo.pdf p1_i.svg --export-id=g23 \
&& rm das_bild_der_tu_darmstadt.pdf p1_i.svg

FROM scratch AS export-stage
COPY --from=build /logo/tuda_logo.pdf .

0 comments on commit 3610fe0

Please sign in to comment.