Skip to content
This repository was archived by the owner on Jul 7, 2023. It is now read-only.

ability to provide versions via env vars #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
FROM alpine
ARG FROM
FROM ${FROM:-alpine}

WORKDIR /app

ENV PATH "$PATH:/app"

ARG OPENJDK_RELEASE=8
ARG PDFTK_RELEASE=v3.0.6
ARG OPENJDK_RELEASE=${OPENJDK_RELEASE:-8}
ARG PDFTK_RELEASE=${PDFTK_RELEASE:-v3.0.6}

RUN set -x \
&& apk add \
Expand Down
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@

Docker alpine image with [pdftk-java](https://gitlab.com/pdftk-java/pdftk) build and `openjdk8-jre` installed.

## Building

With default versions:

```sh
docker build -t my-pdftk-java . < Dockerfile
```

With custom versions of JDK, PDFTK and Alpine image:

```sh
docker build --build-arg FROM=ruby:2.4-alpine --build-arg OPENJDK_RELEASE=8 --build-arg PDFTK_RELEASE=v3.0.6 -t my-pdftk-java . < Dockerfile
```

## Usage

A shell script called `pdftk` has been created to defer calls off to the built binary `/app/pdftk.jar`
Expand Down