Use a Docker image in a local developer environment

Using the same Docker image you created for a build server environment, you can address a local developer scenario.

To begin, ensure that the developer has a myQNX account and an activated named user developer license or floating developer license.

To activate the license, the developer can use the QNX Software Center's GUI or command line. For example, to activate via the command line, the developer could enter:
qnxsoftwarecenter_clt -myqnx.user=JohnDoe@abc.com -myqnx.password=xxxxxx 
-addLicenseKey ABCD-EDFG-HIJK-LMNO-PQRS

See the QNX Software Center User's Guide for more information.

CAUTION:
The developer must perform the activation in the host machine environment and not within the Docker container.

The following steps enable the developer to build via the command line in the Docker container

  1. Launch the Docker container and mount the host machine’s home directory to the container’s default home directory. For example, to mount ~/.qnx to /home/root/.qnx (the home directory of the standard Ubuntu docker image), you would enter:
    sudo docker run -it -v ~/.qnx:/home/root/.qnx

    The mount enables the content in .qnx to override the content in /home/root and thereby allows the machine's license key token to be used.

  2. Source qnxsdp-env.sh in the Docker container.
  3. If the user has a named user perpetual development license, remove the QNXLM_LICENSE_FILE environment variable; this will prevent the container from consuming a floating license accidentally.

    If your users have floating licenses:
    • We recommend that you set up a separate floating license server for each type of floating license (for instance, one server for a floating developer license, a second server for a continuous integration build server license, and a third server for an enterprise development seat license).
    • You must export the QNXLM_LICENSE_FILE variable to point to the correct floating license server.
  4. To test the configuration, run qcc, which performs a license check:
    qcc
    If the license check succeeds...
    The qcc command prints “no files to process”. You can now run the command-line tools.
    If the license check fails...
    You will see a license check error. The error message will indicate the nature of the problem.