• JOC Cockpit comes preinstalled from a container image.
  • Before running the JOC Cockpit container the following requirements should be met:
    • Either the embedded H2® database can be used or an external database should be made available and accessible - see the JS7 - Database article for more information.
    • Volumes are created for persistent JOC Cockpit configuration data and log files.
    • A container network or similar mechanism is made available to enable network access between JOC Cockpit, Controller instance(s) and Agents.
  • Initial operation for JOC Cockpit includes:
    • registering the Controller instance(s) and Agents that are used in the job scheduling environment.
    • optionally registering a JS7 Controller cluster. 

As an alternative to the instructions from this article users can consider the JS7 - JOC Cockpit Installation using Docker Compose article.

Installation Video

This video explains the installation of JOC Cockpit from container images.


Check that  20.10 or newer is operated..

Pulling the JOC Cockpit Image

Pull the version of the JOC Cockpit image that corresponds to the JS7 release in use, for example:

Pulling the JOC Cockpit Image
docker image pull sosberlin/js7:joc-2-5-0

Note: Current releases should be applied as available from

Running the JOC Cockpit Container

After pulling the JOC Cockpit image users can run the container with a number of options such as:

Running the JOC Cockpit Container for HTTP Connections

docker run -dit --rm \
      --hostname=js7-joc-primary \
      --network=js7 \
      --publish=17446:4446 \
      --env="RUN_JS_JAVA_OPTIONS=-Xmx256m" \
      --env="RUN_JS_USER_ID=$(id -u $USER):$(id -g $USER)" \
      --mount="type=volume,src=js7-joc-primary-config,dst=/var/" \
      --mount="type=volume,src=js7-joc-primary-logs,dst=/var/log/" \
      --name js7-joc-primary \


  • --network The above example makes use of a container network - created, for example, using the docker network create js7 command - to allow network sharing between containers. Note that any inside ports used by containers are visible within a container network. Therefore a JOC Cockpit instance running for the inside port 4446 can be accessed with the container's hostname and the same port within the container network.
  • --publish The JOC Cockpit has been configured to listen to the HTTP port 4446. An outside port of the container's host is mapped to the JOC Cockpit inside HTTP port. This mapping is required to allow direct access to the JOC Cockpit user interface from its outside port .
  • --env=RUN_JS_JAVA_OPTIONS This allows any Java options to be injected into the JOC Cockpit container. Preferably this is used to specify memory requirements of the JOC Cockpit, for example,  with -Xmx256m. For details see JS7 - FAQ - Which Java Options are recommended
  • --env=RUN_JS_USER_ID Inside the container the JOC Cockpit is running for the jobscheduler user account. In order to access, for example, log files created by the JOC Cockpit, which are mounted to the container's host, it is recommended that users map the account that starts the container to the jobscheduler account inside the container. The RUN_JS_USER_ID environment variable accepts the User ID and Group ID of the account that will be mapped. The example above makes use of the current user, for details see JS7 - Running Containers for User Accounts.
  • --mount The following volume mounts are suggested:
    • config: The configuration folder allows specification of individual settings for JOC Cockpit operation - see the sections below and the JS7 - JOC Cockpit Configuration Items article. This includes specifying the connection to the JS7 - Database. In addition users can store their versions of the following files in the volume for the configuration directory.
    • logs: In order to make JOC Cockpit log files persistent they have to be written to a volume that is mounted for the container. Users are free to adjust the volume name from the src attribute. However, the value of the dst attribute should not be changed as it reflects the directory hierarchy inside the container.
    • Containers offer a number of ways of mounting or binding volumes including, for example, creation of local directories and binding them to volumes like this:

      Example how to create Docker volumes
      # example to map volumes to directories on the container's host prior to running the JOC Cockpit container
      mkdir -p /home/sos/js7/js7-joc-primary/config /home/sos/js7/js7-joc-primary/logs
      docker volume create --driver local --opt o=bind --opt type=none --opt device="/home/sos/js7/js7-joc-primary/config" js7-joc-primary-config
      docker volume create --driver local --opt o=bind --opt type=none --opt device="/home/sos/js7/js7-joc-primary/logs" js7-joc-primary-logs

      There are alternative ways of achieving this. As a result users have a access to the directories /var/ and /var/log/ inside the container and data in both locations should be persistent. If volumes are not created before running the container then they will be mounted automatically. However, users should have access to data in the volumes, e.g. by access to /var/lib/docker/volumes/js7-joc-primary-config etc.

Installing Database Objects

JOC Cockpit requires a database connection, see JS7 - Database.

The database connection should be configured before the initial start of the JOC Cockpit container.

The following sections can be skipped when using the H2® embedded database to evaluate JS7. Here it is sufficient to have the Hibernate configuration ready as this database runs in pre-configured mode inside the container.

Check the JDBC Driver

JS7 ships with a number of JDBC Drivers.

  • JDBC Drivers for use with MariaDB®, MySQL®, Oracle®, PostgreSQL® are included with JS7.
    • For details about JDBC Driver versions see the JS7 - Database article.
    • Should users have good reasons to use a different version of a JDBC Driver then they can apply the JDBC Driver version of their choice.
  • For use with H2®
    • The version of H2® successfully tested by SOS is h2-1.4.200.jar. At the time of writing later versions do not provide decent compatibility with MySQL to be applicable for JS7.
  • For use with Microsoft SQL Server®
    • The JDBC Driver has to be downloaded by the user as it cannot be bundled with open source software due to license conflicts.
  • Users can download JDBC Drivers from vendor's sites and store the resulting *.jar file(s) in the following location:
    • Location in the container: /var/
    • Consider accessing this directory from the volume that is mounted when running the container, for example, from a local folder /home/sos/js7/js7-joc-primary/config/lib.
    • Refer to the JS7 - Database article for details about the procedure.

Configure the Database Connection

In a first step users have to create a database schema and account for JS7. The database schema has to support the Unicode character set. 

  • For examples how to set up the database see the JS7 - Database article.

In a second step the database connection has to be specified from a Hibernate configuration file:

  • Location in the container: /var/
  • Consider accessing the configuration file from the volume that is mounted when running the container, for example, from a local folder /home/sos/js7/js7-joc-primary/config.
  • Information about use of the hibernate.cfg.xml file for the respective DBMS can be found in the JS7 - Database article.

Create Database Objects

Database objects are created by executing the following script inside the container::

Create Database Objects
# create database objects
 docker exec -ti js7-joc-primary /bin/sh -c /opt/


  • docker exec -ti is the command that connects to the JOC Cockpit container js7-joc-primary.
  • js7-joc-primary is the name of the JOC Cockpit container as specified in the docker run command mentioned above.
  • /bin/sh -c runs a shell inside the container and executes a script to install and populate the database objects required for operation of the JOC Cockpit.
  • Note that there is no harm in re-running the script a number of times as it will not remove existing data from the database.
  • Note that the script has to be executed once for any newer JOC Cockpit releases that are used from images provided by SOS.

Time Service

It is necessary that a time service is operated on the container's host which runs the JOC Cockpit in order to synchronize the system clock's time.

Log Files

Access to log files is essential to identify problems during installation and operation of containers.

By mounting a volume for log files as explained above users have access to the files indicated in the JS7 - Log Files and Locations article.

  • The jetty.log file reports about initial start up of the servlet container.
  • The joc.log file includes e.g. information about database access.

Initial Operation

For initial operation, the JOC Cockpit is used to make Controller instance(s) and Agent instances known to the job scheduling environment.

For use of JOC Cockpit with the Open Source license and with the commercial JS7 - License the following information applies:

If the JS7 is used for high availability in a JS7 - JOC Cockpit ClusterJS7 - Controller Cluster or JS7 - Agent Cluster using the commercial JS7 - License the following information applies:

Further Resources

Configuring the JOC Cockpit

Note that it is not necessary to configure the JOC Cockpit - it runs out-of-the-box. The default configuration specifies that: HTTP connections are used which expose unencrypted communication between clients and JOC Cockpit. Authentication is performed by hashed passwords.

Users who intend to operate a compliant and secure job scheduling environment or who wish to operate JOC Cockpit as a cluster for high availability are recommended to familiarize themselves with the JS7 - JOC Cockpit Configuration for Containers article series.

Build the JOC Cockpit Image

User who wish to create their own images of the JOC Cockpit can find instructions in the JS7 - JOC Cockpit Build of Container Image article.