mirror of
https://github.com/NetherlandsForensicInstitute/hansken-extraction-plugin-sdk-documentation.git
synced 2026-02-14 14:09:49 +00:00
43 lines
1.6 KiB
Plaintext
43 lines
1.6 KiB
Plaintext
# Packaging
|
|
|
|
Extraction plugins are packaged as OCI images (also known as Docker images).
|
|
The OCI images are labeled with the PluginInfo.
|
|
To automate packaging of a Java plugin and labeling the OCI image, the Extraction Plugin SuperPom has been configured to automate this for you.
|
|
|
|
If your project uses the Extraction Plugin SuperPom (see [Prerequisites](prerequisites.md)), Packaging an extraction plugin is handled by Maven.
|
|
To package your plugin into a container image, the following command can be used:
|
|
|
|
```bash
|
|
mvn package docker:build
|
|
```
|
|
|
|
This will generate a plugin image:
|
|
|
|
* The extraction plugin is added to your local image registry
|
|
(`docker images`),
|
|
* The image name is `extraction-plugin/PLUGINID`, e.g.
|
|
`extraction-plugin/nfi.nl/extract/chat/whatsapp`,
|
|
* The image is labeled with two tags: `latest`, and your plugin version.
|
|
|
|
It is possible to apply extra arguments to the docker command [as described here](http://dmp.fabric8.io/#docker:build).
|
|
For example, to specify a proxy, use the following command:
|
|
|
|
```bash
|
|
mvn package docker:build -Ddocker.buildArg.https_proxy=https://proxy:8001
|
|
```
|
|
|
|
Once your plugin is packaged, it can be published or 'uploaded' to Hansken.
|
|
See ":ref:`upload_plugin`" for instructions.
|
|
|
|
.. _java_superpom_podman:
|
|
|
|
Note: if your build environment does not have Docker available, you can use
|
|
[podman](https://podman.io/) as an alternative. Install podman on your machine
|
|
or build agent, and run the following commands _before_ invoking the
|
|
`mvn package docker:build` command:
|
|
|
|
```bash
|
|
podman system service --time=0 unix:/run/user/$(id -u)/podman/podman.sock &
|
|
export DOCKER_HOST="unix:/run/user/$(id -u)/podman/podman.sock"
|
|
```
|