Skip to content

Commit

Permalink
Merge branch 'feat/docker-cli' of github.com:veraPDF/veraPDF-apps int…
Browse files Browse the repository at this point in the history
…o feat/docker-cli
  • Loading branch information
carlwilson committed Sep 30, 2024
2 parents e2c8591 + 85be874 commit 3690187
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
# First build the app on a maven open jdk 11 container
ARG VERAPDF_VERSION=1.26
ARG VERAPDF_MINOR_VERSION=2
ARG VERAPDF_INSTALLER_FOLDER=releases
FROM eclipse-temurin:11-jdk-alpine AS app-installer
ARG VERAPDF_VERSION
ARG VERAPDF_MINOR_VERSION
ENV VERAPDF_VERSION=${VERAPDF_VERSION}
ENV VERAPDF_MINOR_VERSION=${VERAPDF_MINOR_VERSION}
ENV VERAPDF_INSTALLER_FOLDER=${VERAPDF_INSTALLER_FOLDER}

WORKDIR /tmp
COPY docker-install.xml .
RUN wget -O /tmp/verapdf-installer.zip https://software.verapdf.org/releases/${VERAPDF_VERSION}/verapdf-greenfield-${VERAPDF_VERSION}.${VERAPDF_MINOR_VERSION}-installer.zip
RUN wget -O /tmp/verapdf-installer.zip https://software.verapdf.org/${VERAPDF_INSTALLER_FOLDER}/${VERAPDF_VERSION}/verapdf-greenfield-${VERAPDF_VERSION}.${VERAPDF_MINOR_VERSION}-installer.zip
RUN unzip verapdf-installer.zip && java -jar ./verapdf-greenfield-${VERAPDF_VERSION}.${VERAPDF_MINOR_VERSION}/verapdf-izpack-installer-${VERAPDF_VERSION}.${VERAPDF_MINOR_VERSION}.jar docker-install.xml

# Now build a Java JRE for the Alpine application image
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,17 @@ Where `${project.version}` is the current Maven project version. This should bri

## Building the Docker image

The accompanying [`Dockerfile`](Dockerfile) can be used to build a Docker image containing the veraPDF CLI and GUI applications. The image is based on the official Alpine image. It effedoesn't build the project, instead it downloads a version of the installer. It also builds a slimline JRE which is used to trim the final image size.
The accompanying [`Dockerfile`](Dockerfile) can be used to build a Docker image containing the veraPDF CLI and GUI applications. The image is based on the official Alpine image. It doesn't build the project, instead it downloads a version of the installer. It also builds a slimline JRE which is used to trim the final image size.

The version built is controlled by two arguments in the Dockerfile, `VERAPDF_VERSION` and `VERAPDF_MINOR_VERSION`. These can be used to select a specific installer at invocation time. The default values are `VERAPDF_VERSION=1.27.0` and `VERAPDF_MINOR_VERSION=2`, which builds the latest production version, e.g. `1.26.2`.
The version built is controlled by three arguments in the Dockerfile, `VERAPDF_VERSION`, `VERAPDF_MINOR_VERSION` and `VERAPDF_INSTALLER_FOLDER`. These can be used to select a specific installer at invocation time. The default values are `VERAPDF_VERSION=1.26`, `VERAPDF_MINOR_VERSION=2` and `VERAPDF_INSTALLER_FOLDER=releases`, which builds the latest production version, e.g. `1.26.2`.

To build and run the very latest version:

docker build -t verapdf .
docker run -it -v "$(pwd)":/data --name verapdf verapdf a.pdf

To build a specific version, e.g. `1.26.3`:
To build a specific version, e.g. `1.22.3`:

docker build --build-arg VERAPDF_VERSION=1.22 --build-arg VERAPDF_MINOR_VERSION=3 -t verapdf .

To build a specific development version argument `VERAPDF_INSTALLER_FOLDER` should be set to `develop`.

0 comments on commit 3690187

Please sign in to comment.