Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Dockerfile

Download: Dockerfile

Docker Container images for JS7 Controllers provided by SOS make use of the following Dockerfile:

...

  • Line 12 - 23: Default values are specified which are used if no command line arguments are provided. This includes values for:
    • the release number: adjust this value to the release of JS7 that you want to build a Controller for.
    • the repository which by default is sosberlin:js7.
    • the image name is determined from the current folder name and the release number.
    • the user id by default is the user id of the user running the build script.
    • the Controller ID can be specified that is a unique identifier for a Controller installation.
    • the HTTP port and HTTPS port: if the respective port is not specified then the Controller will not listen to a port for the respective protocol. You can for example disable the HTTP protocol by specifying an empty value. The default ports should be fine as they are mapped by the run script to outside ports on the Docker container's host. However, you can modify ports as you like.
    • Java options: typically you would specify default values e.g. for Java memory consumption. The Java options can be overwritten by the run script when starting the container. However, you might want to create your own image with adjusted default values.
  • Line 28 - 53: The above options can be overwritten by command line arguments like this:


    Code Block
    languagebash
    titleRunning the Build Script with Arguments
    linenumberstrue
    ./build.sh --id=js7-prod --http-port=14445 --https-port=14443 --java-options="-Xmx1G"
  • Line 60 - 71: The effective docker build command is executed with arguments. The Dockerfile is assumed to be located with the build sub-directory of the current directory.

...