Differences
This shows you the differences between two versions of the page.
— |
blocks:server:docker [2023-07-12 11:38] (current) admin created |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Running Blocks in a Docker container ====== | ||
+ | |||
+ | Blocks can run in a [[https:// | ||
+ | |||
+ | :!: The Docker image currently only supports the AMD64/ | ||
+ | |||
+ | ===== Setting up a CodeMeter license server ===== | ||
+ | |||
+ | A Docker container cannot directly access physical USB license key. To allow a Docker container to access a license available on the host computer (or any other computer running CodeMeter), the licens must be shared over the network using the " | ||
+ | |||
+ | The process of enabling the " | ||
+ | |||
+ | On Linux: | ||
+ | - Stop the CodeMeter service by typing '' | ||
+ | - Open ''/ | ||
+ | - Scroll down to the row beginning with '' | ||
+ | - Start the CodeMeter service again by typing '' | ||
+ | |||
+ | On Windows you may use either CodeMeter' | ||
+ | - Search for " | ||
+ | - Type '' | ||
+ | |||
+ | ===== Building the Docker image from the Dockerfile ===== | ||
+ | |||
+ | :!: When building the image, make sure there are no USB license keys connected to the computer. Otherwise, the build process may fail. | ||
+ | |||
+ | - Download [[https:// | ||
+ | - If you opted for th ZIP file, extract the ZIP and open the resulting folder in a terminal. | ||
+ | - Type '' | ||
+ | |||
+ | ===== Running the image in a Docker container ===== | ||
+ | |||
+ | To run the image in a Docker container, a few things have to be configured: | ||
+ | |||
+ | * Port 8080 must be mapped to a port on the host system and a mount path for / | ||
+ | * The USERID environment varaible must be set to match the UID of the owner of the / | ||
+ | * The TZ environment variable should be set to the correct time zone. [[https:// | ||
+ | * The LICENSE_SERVER environment variable should be set to the address of the CodeMeter license server. (In some cases, this may not be required if the license server is running on the host computer, although this behaviour does not seem to be consistent across different platforms.) | ||
+ | |||
+ | :!: **WARNING: | ||
+ | |||
+ | The previously downloaded and extracted archive contains a docker-compose.yml file. Modify the container configuration in this file according to the descriptions above, then simply run '' | ||
+ | |||
+ | Below is a sample docker-compose configuration: | ||
+ | |||
+ | < | ||
+ | services: | ||
+ | blocks: | ||
+ | | ||
+ | init: true | ||
+ | | ||
+ | | ||
+ | - 8080:8080 | ||
+ | | ||
+ | - / | ||
+ | | ||
+ | - USERID=1000 | ||
+ | - LICENSE_SERVER=10.0.1.2 | ||
+ | - TZ=Europe/ | ||
+ | </ | ||
+ | |||
+ | ===== Running a different Blocks version ===== | ||
+ | |||
+ | The startup script will download the latest version of Blocks to / | ||