Skip to content

Resourcectl

Description

This image permits launching resourcectl command :

  • punchplatform libraries (punch-command-app jar)

The Dockerfile to construct this image is the following :

FROM adoptopenjdk/openjdk11:alpine

LABEL maintainer="Punchplatform"
LABEL mail="contact@punchplatform.com"
LABEL org.opencontainers.image.description "Punchplatform Resourcectl"

ARG PUNCHPLATFORM_VERSION

ENV LANG=en_US.UTF-8 \
    LC_NUMERIC=en_US.UTF-8 \
    LC_TIME=en_US.UTF-8 \
    LC_ALL=en_US.UTF-8

RUN apk update
RUN apk add unzip bash

WORKDIR /punch

COPY target/dependency/punch-command-app-${PUNCHPLATFORM_VERSION}-jar-with-dependencies.jar commands.jar
COPY resources/ conf/log4j/
COPY start.sh .

ENTRYPOINT ["/bin/bash", "start.sh"]
CMD "help"

The start.sh executable is the following:

set -x

java -cp /punch/commands.jar org.thales.punch.cli.resourcectl.ResourceCtl $@

Usage

Docker generic usage

With secret

To interact with a resource manager protected with credentials and/or TLS, you have to mount username, password, cert and key files in the container, then you should specify in args the path containing those secrets.

docker run \
 -v /path/to/username_file:/etc/secrets/auth/username \
 -v /path/to/password_file:/etc/secrets/auth/password \
 -v /path/to/tls.key:/etc/secrets/tls/tls.key \
 -v /path/to/tls.crt:/etc/secrets/tls/tls.crt \
 resourcectl:7.0.1 --url <URL> \
 --basic-auth-dir /etc/secrets/auth \
 --tls-dir /etc/secrets/tls \
 list 

Without secret

docker run ghcr.io/punchplatform/resourcectl:7.0.1-SNAPSHOT --url <URL> list

Without certificates validation

Sometimes you need to call resourcectl using https:// with self-signed certificates, but you do not have certificates. You can use --trust-certificate to bypass certificate and hostname validation.

docker run ghcr.io/punchplatform/resourcectl:7.0.1-SNAPSHOT --url https://<URL> --trust-certificate list

Punchline usage

Get it !

docker pull ghcr.io/punchplatform/resourcectl:7.0.1-SNAPSHOT