Assign host license to docker container

Follow this process if you wish to assign a license to a docker container from a licensed Genero product on the host machine.

The procedure described here applies to assigning a license from a host to a Genero Business Development Language (BDL) installation in a docker container.

License controllers for Genero Report Engine (greWrt) and Genero Report Writer (grxWrt) provide a docker-assign function for those Genero products.

Before you begin:
  • Make sure that the BDL installing path (FGLDIR) is not the same on both the host and the Docker container.
  • You must have created a docker image as described in Build docker image with FGLGWS package.
  • You must have Docker installed and running.
  1. Run the docker command with the option to mount the host installation directory (FGLDIR) in the container.
    Type the command:
    docker run --rm -it \
    --volume /opt/fourjs/fglgws-license:/opt/fourjs/fglgws-license\
    -t --name fglgws fglgws-base
    Important:

    The --volume option mounts the host FGLDIR directory on the container. The names of the mounted directories must be the same in the host and docker container.

  2. Set up the path to the license controller in the docker container.
    At the command line type the command:
    export FGLWRTPATH=/opt/fourjs/fglgws-license
  3. Back on the host machine. Set the Genero BDL environment by running the script envcomp
    Tip: To detach from the fglgws container and leave it running, use the keyboard sequence Ctrl + p Ctrl + q.
    At the command line type:
    . /opt/fourjs/fglgws-license/envcomp
  4. Assign the Genero BDL license on the host to the docker container named "fglgws":
    Type the license controller command:
    fglWrt docker-assign fglgws
  5. Attach to the container fglgws.
    Type the command:
    docker attach fglgws
  6. Check the Genero BDL license in the container.
    At the command line, type the license controller command:
    fglWrt -a info
    The license information shows the expected details of the license and you see it is assigned to the docker container. It can not be used again on the host, until it is released from the docker container.
    License : XXX#XXXXXXXX
    Product : Four Js Universal Compiler
    Type : Development version
    Users : 10
    Extension(s) :
    - Open Database Interface
    End of maintenance date: 2018/12/31 (Year/Month/Day).
    License assigned to docker instance '4c5c3747e838916365d04f2a2300a20334b91afb9629861a6ddceb7d3abfd15f
What to do next:

A Genero license assigned to a docker container can be released back to the host installation. See Release docker container license.