Skip to content

Instantly share code, notes, and snippets.

@liongkj
Created December 25, 2022 15:31
Show Gist options
  • Select an option

  • Save liongkj/6072c003f49ffd49dc55271385179729 to your computer and use it in GitHub Desktop.

Select an option

Save liongkj/6072c003f49ffd49dc55271385179729 to your computer and use it in GitHub Desktop.
installing pdftk-java in docker containers
FROM python:3.10
RUN apt-get update -y && software-properties-common && \
apt-add-repository 'deb http://security.debian.org/debian-security stretch/updates main' && apt update -y && \
apt-get install -y openjdk-8-jdk-headless
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/
RUN wget https://gitlab.com/api/v4/projects/5024297/packages/generic/pdftk-java/v3.3.3/pdftk-all.jar
# make a .sh file to run pdf tk
RUN echo "java -jar pdftk-all.jar \$@" > /usr/bin/pdftk
RUN chmod +x /usr/bin/pdftk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment