Skip to content

Commit

Permalink
Merge pull request #14 from jobrad-gmbh/dockerfile-gs-cleanup
Browse files Browse the repository at this point in the history
Fix the cleanup of Ghostscript build directory in Dockerfile
  • Loading branch information
borna-ng authored Apr 15, 2024
2 parents 31d2d9e + 4e772d3 commit 9df3382
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,18 @@ RUN curl -sL -o /tmp/wkhtmltox.deb https://github.com/wkhtmltopdf/wkhtmltopdf/re

# ghostscript
COPY docker/ghostscript_cmap_copyfix.diff /tmp/ghostscript_cmap_copyfix.diff
RUN GHOSTSCRIPT_VERSION=10020 && GHOSTSCRIPT_FILE_NAME=ghostscript-10.02.0.tar.gz \
RUN GHOSTSCRIPT_VERSION=10020 \
&& GHOSTSCRIPT_FILE_NAME=ghostscript-10.02.0.tar.gz \
&& GHOSTSCRIPT_BASE_NAME=$(basename ${GHOSTSCRIPT_FILE_NAME} .tar.gz) \
&& curl -sL -o /tmp/${GHOSTSCRIPT_FILE_NAME} https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs${GHOSTSCRIPT_VERSION}/${GHOSTSCRIPT_FILE_NAME} \
&& tar -xzf /tmp/${GHOSTSCRIPT_FILE_NAME} -C /tmp \
&& cd /tmp/$(basename ${GHOSTSCRIPT_FILE_NAME} .tar.gz)/ \
&& cd /tmp/${GHOSTSCRIPT_BASE_NAME}/ \
&& patch -p1 < /tmp/ghostscript_cmap_copyfix.diff \
&& ./configure \
&& make \
&& make install \
&& ln -s /usr/local/bin/gs /usr/local/bin/ghostscript \
&& rm -rf /tmp/${GHOSTSCRIPT_FILE_NAME} /tmp/$(basename ${GHOSTSCRIPT_FILE_NAME} .tar.gz})
&& rm -rf /tmp/${GHOSTSCRIPT_FILE_NAME} /tmp/${GHOSTSCRIPT_BASE_NAME}

# odoo directories
RUN useradd -s /usr/sbin/nologin --create-home --password odoo odoo \
Expand Down

0 comments on commit 9df3382

Please sign in to comment.