Build docker image with FGLGWS package

Follow this process to build a docker image with an FGLGWS package for use in a docker container.

About this task: The procedure described here applies to a Genero Business Development Language (BDL) installation in a docker container. The procedure may be adapted to add other Genero products to the docker container.

Before you begin:
  • You have created a docker image called fglgws-os as described in Build operating system image.
  • You have the FGLGWS package required for your installation downloaded to your system from the Four Js web site, www.4js.com.
  • You have Docker installed and running.
  1. Make a directory with a name that relates to your image.
    For example, a directory called fglgws-base may contain a Dockerfile for your image.
    mkdir fglgws-base
  2. Create a docker file to install the FGLGWS package.
    With a text editor create the file as shown, and save it as Dockerfile:
    FROM fglgws-os
    USER root
    
    ARG user=genero
    ARG group=fourjs
    ARG FGLGWS_PACKAGE
    
    WORKDIR ${HOME}
    
    COPY ${FGLGWS_PACKAGE} /tmp/fglgws-install.run
    
    RUN mkdir -p /opt/fourjs \
      && chown ${user}:${group} /opt/fourjs /tmp/fglgws-install.run
    USER ${user}
    
    # Install fglgws package
    ENV FGLDIR /opt/fourjs/fglgws
    ENV PATH ${FGLDIR}/bin:${PATH}
    RUN /tmp/fglgws-install.run --accept --install --quiet --target ${FGLDIR} \
      && fglrun -V \
      && rm -f /tmp/fglgws-install.run

    In this example, the base image already created is used to build the FGLGWS installation (FROM fglgws-os). Permissions are set up for the installation to be run in the /opt/fourjs/fglgws directory by the "genero" user when the docker container is run.

  3. At the command line type the following command to build the image from your dockerfile:
    docker build --force-rm \
         --build-arg FGLGWS_PACKAGE=fjs-fglgws-3.10.01-build1486651223-l64xl212.run \
         -t fglgws-base .

    The build parameter --build-arg specifies the FGLGWS package to be installed in the docker container when created.

  4. Get a list of docker images.
    docker images
    Your docker image (fglgws-base) is shown in the list.
What to do next:

Run the docker container and check Genero BDL license status. See Run docker container.