-
Notifications
You must be signed in to change notification settings - Fork 25
How do I get Docker images for Qanary components?
Up-to-date Docker images for Qanary components and the pipeline (reference) implementation are published on the official Qanary Docker repository on Docker Hub.
Note: It is suggested to always use the latest
version tag when fetching Qanary component images.
Examples:
- Use
docker pull qanary/qanary-pipeline:latest
to pull the latest stable Docker image for the Qanary pipeline - Use
docker pull qanary/qanary-pipeline:3.3.4
to pull the image for Qanary pipeline version 3.3.4 - Use
docker pull qanary/ld-shuyo:4.0.0
to pull the image for Qanary component LD-Shuyo version 4.0.0
By default, while building any Qanary component implemented in Java, the Maven project will also create a Docker image for the Qanary component (the same is true for the Qanary pipeline implementation). The corresponding image name and tag are displayed at the end of the build processes.
Components built using the Qanary Maven Archetype come with a predefined Dockerfile.
The Dockerfile might look like this:
FROM openjdk:11
# Add the service itself
ARG JAR_FILE
ADD target/${JAR_FILE} /qanary-service.jar
ENTRYPOINT ["java", "-jar", "/qanary-service.jar"]
When building the image manually with the given Dockerfile (cf. Dockerfile documentation) you need to pass the location of the .jar
file as build parameter (this is done automatically in the Maven process).
Example: Use the following command in the directory Qanary/qanary_pipeline-template/ to build the Docker image for Qanary pipeline version 3.0.0:
docker build --build-arg JAR_FILE=qa.pipeline-3.0.0.jar -t qanary-pipeline:3.0.0 .
To publish created Docker images to a personal repository on Dockerhub you will need to rename the created image, s.t., it contains the name of the repository. For example, official images for the Qanary framework and components are published on the qanary
repository: qanary/qanary-pipeline:latest
To automatically generate this image name when building the Docker image with Maven, set the docker.image.prefix
in the components pom.xml
accordingly:
<properties>
...
<docker.image.prefix>YOUR_REPOSITORY</docker.image.prefix>
<docker.image.name>YOUR_COMPONENT_NAME</docker.image.name>
...
</properties>
Alternatively, you can rename created images manually with the command: docker image tag
Then push the image to Dockerhub using: docker push <image>
-
How to establish a Docker-based Qanary Question Answering system
-
How to implement a new Qanary component
... using Java?
... using Python (Qanary Helpers)?
... using Python (plain Flask service)?