oftp2/os4x

By oftp2

Updated 10 days ago

OS4X - the OFTP2 system for Unix

Image
Integration & Delivery
Networking

9.1K

Quick reference

What is OS4X?

logo

OS4X (the OFTP2 system for Unix) is a professional, certified OFTP2 solution for managed file transfers for CAD and EDI data. It offers an state-of-the-art easy to use HTML5 web interface for administration and end-user interaction. With hundreds of features, OS4X offers a wide set of functionality for all automated tasks of data transmission, conversion, documentation etc.

https://www.os4x.com

What is included

Since OS4X has a defined list of system requirements, this docker image offers everything to start with OS4X instantly:

  • Latest OS4X version
  • Apache webserver
  • PHP
  • Exim4 mail server
  • required tools (ZIP, TAR, gzip, bzip2, xsltproc, bc, ...)

Requirement

This container requires a MariaDB container to be available with the alias mariadb (see below). You can easily deploy one via

$ docker run --name some-mariadb -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mariadb

For Raspberry Pi, we recommend the hypriot/rpi-mysql container, offering a network-enabled MySQL server:

$ docker run --name some-mariadb -e MYSQL_ROOT_PASSWORD=my-secret-pw -d hypriot/rpi-mysql

Please give the database container time to start up correctly. It must be running the network listener (after a temporary database server has been started for initial setup). This may take some seconds.

How to use this image

During startup, this image requires a volume os4x_data (mounted at /os4x_data) where content is dynamically filled during first startup.

The exposed TCP ports are:

  • 80 and 443 for HTTP(s)
  • 3305 for OFTP1.x over plain TCP
  • 6619 for OFTP2 over TLS

Fast startup via docker-compose (x86_64 and arm64/Apple M1) on Unix

Save this docker-compose.yml into an empty directory;

version: '3.3'

services:
 mariadb:
   image: mariadb
   restart: always
   volumes:
     - $HOME/OS4X_DB:/var/lib/mysql
   environment:
     MARIADB_ROOT_PASSWORD: "my-secret-pw"
 os4x:
   image: oftp2/os4x
   restart: always
   depends_on:
     - mariadb
   ports:
     - 8080:80
     - 6619:6619
   volumes:
     - $HOME/OS4X:/os4x_data
   environment:
     MARIADB_NAME: mariadb
     MARIADB_ENV_MARIADB_MAJOR: "10.6"
     MARIADB_ENV_MYSQL_ROOT_PASSWORD: "my-secret-pw"

then change into this directory and start up the docker container:

docker-compose up -d

Fast startup via docker-compose (x86_64) on Windows

Save this docker-compose.yml into an empty directory;

version: '3.3'

services:
 mariadb:
   image: mariadb
   restart: always
   volumes:
     - ${LOCALAPPDATA}/OS4X_DB:/var/lib/mysql
   environment:
     MARIADB_ROOT_PASSWORD: "my-secret-pw"
 os4x:
   image: oftp2/os4x
   restart: always
   depends_on:
     - mariadb
   ports:
     - 8080:80
     - 6619:6619
   volumes:
     - ${LOCALAPPDATA}/OS4X:/os4x_data
   environment:
     MARIADB_NAME: mariadb
     MARIADB_ENV_MARIADB_MAJOR: "10.6"
     MARIADB_ENV_MYSQL_ROOT_PASSWORD: "my-secret-pw"

then change into this directory and start up the docker container:

docker-compose up -d

Fast startup via docker-compose (armv7l/Raspberry Pi)

Save this docker-compose.yml into an empty directory;

version: '3.3'

services:
 mariadb:
   image: hypriot/rpi-mysql
   restart: always
   volumes:
     - $HOME/OS4X_DB:/var/lib/mysql
   environment:
     MYSQL_ROOT_PASSWORD: "my-secret-pw"
 os4x:
   image: oftp2/os4x
   restart: always
   depends_on:
     - mariadb
   ports:
     - 8080:80
     - 6619:6619
   volumes:
     - $HOME/OS4X:/os4x_data
   environment:
     MARIADB_NAME: mariadb
     MARIADB_ENV_MARIADB_MAJOR: "5.5"
     MARIADB_ENV_MYSQL_ROOT_PASSWORD: "my-secret-pw"

then change into this directory and start up the docker container:

docker-compose up -d

Using the new network option to link OS4X to database

Since the --link option is marked as obsolete (but not yet removed) in Docker, we prefer the "network bridge" solution to connect OS4X to the database. With this method, you must know special values of the database server.

Start without any modification (new way, without deprecated --link option)

Steps of configuration

  • Create a new network for the communication between MariaDB server and OS4X (i.e. docker network create os4x-network):

  • Join database server to this network (i.e. docker network connect os4x-network some-mariadb)

  • Define all environment variables in new OS4X container (required!): -- MARIADB_NAME: matching the container name hosting the database (i.e. some-mariadb) -- MARIADB_ENV_MYSQL_ROOT_PASSWORD: matching the root password of the database server (see above) -- in case of MariaDB: MARIADB_ENV_MARIADB_MAJOR: the version of the MariaDB server (i.e. 10.6, see this container's environment variable MARIADB_MAJOR) -- in case of MySQL: MARIADB_ENV_MYSQL_VERSION: the version of the MySQL server (i.e. 8.0, see this container's environment variable MYSQL_VERSION)

  • Optional: -- MARIADB_PORT_3306_TCP_PORT: default 3306 -- OS4X_DB_USER: default os4x -- OS4X_DB_PASSWORD: default os4x -- OS4X_DB_NAME: default os4x

(AMD64) Start with a defined volume directory and expose port 80 (as local port 8080) and 6619 (most common use-case)

Important: the selected network must be the same as the newly created one above.

$ docker run --name my-os4x -d \
  --network=os4x-network \
  -e MARIADB_NAME=some-mariadb \
  -e MARIADB_ENV_MYSQL_ROOT_PASSWORD=my-secret-pw \
  -e MARIADB_ENV_MARIADB_MAJOR=10.6 \
  -p 8080:80 -p 6619:6619 \
  -v /data/OS4X:/os4x_data \
  oftp2/os4x

All important data is stored in /data/OS4X and can be used to recover an OS4X instance.

(Raspberry Pi) Start with a defined volume directory and expose port 80 (as local port 8080) and 6619 (most common use-case)

Important: the selected network must be the same as the newly created one above.

$ docker run --name my-os4x -d \
  --network=os4x-network \
  -e MARIADB_NAME=some-mariadb \
  -e MARIADB_ENV_MYSQL_ROOT_PASSWORD=my-secret-pw \
  -e MARIADB_ENV_MYSQL_VERSION=5.5 \
  -p 8080:80 -p 6619:6619 \
  -v /data/OS4X:/os4x_data \
  oftp2/os4x

All important data is stored in /data/OS4X and can be used to recover an OS4X instance.

Using the deprecated --link option to link OS4X to database

Start without any modification (deprecated --link version)
$ docker run --name my-os4x -d --link some-mariadb:mariadb oftp2/os4x

A new volume is dynamically created. For re-using, you are on your own.

Start with a defined volume directory and expose port 80 (as local port 8080) and 6619 (most common use-case)
$ docker run --name my-os4x --link some-mariadb:mariadb -d \
  -p 8080:80 -p 6619:6619 -v /data/OS4X:/os4x_data oftp2/os4x

All important data is stored in /data/OS4X and can be used to recover an OS4X instance.

Start with a defined volume directory and expose port 80 (as local port 8080) and 6619 and specified database connector
$ docker run --name my-os4x --link some-mariadb:mariadb -d \
  -e OS4X_DB_PASSWORD=os4xpwd -e OS4X_DB_NAME=myos4xdb \
  -e OS4X_DB_USER=myos4xuser -p 8080:80 -p 6619:6619 \
  -v /data/OS4X:/os4x_data oftp2/os4x

All important data is stored in /data/OS4X and can be used to recover an OS4X instance.

Updating

Updating consists of several steps:

  • Obtaining the latest image ("pull")
  • Create a new container, based on the new (updated) image, using your previous volume

The steps are as an example:

$ docker pull oftp2/os4x
$ docker-compose up -d

Because creating a new container also changes the MAC and IP address of the new container, we have implemented a...

Luxury feature

During startup, the OS4X docker container checks if a license exists. If this is the case and if it doesn't match the local parameters (i.e. after upgrade), it will convert the existing license via an online service (if available). Requirement: you must have a commercial OS4X license.

Environment Variables

OS4X creates dynamically a new database with the given parameters, if not existing. The parameters for this database can be influenced by the following environment variables which can be passed to the container.

OS4X_DB_NAME

Name of the created database. Default: os4x.

OS4X_DB_USER

Name of the created or used MariaDB user. Default: os4x.

OS4X_DB_PASSWORD

Password of the used MariaDB user. Default: os4x.

Docker Pull Command

docker pull oftp2/os4x