https://github.com/crazy-max/docker-ejtserver
EJT License Server Docker image
https://github.com/crazy-max/docker-ejtserver
alpine-linux docker ej-technologies ejtserver
Last synced: about 1 year ago
JSON representation
EJT License Server Docker image
- Host: GitHub
- URL: https://github.com/crazy-max/docker-ejtserver
- Owner: crazy-max
- License: mit
- Created: 2018-02-05T16:04:37.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-06-23T15:37:07.000Z (about 2 years ago)
- Last Synced: 2024-10-30T02:44:49.884Z (over 1 year ago)
- Topics: alpine-linux, docker, ej-technologies, ejtserver
- Language: Dockerfile
- Homepage:
- Size: 443 KB
- Stars: 21
- Watchers: 5
- Forks: 9
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Codeowners: .github/CODEOWNERS
- Support: .github/SUPPORT.md
Awesome Lists containing this project
README
## ⚠️ Abandoned project
Since EJT License Server 2.0, a Dockerfile is available in the unix tarball to
build an image yourself. Therefore, this project is abandoned but feel free to
fork and make your own changes if needed.
## About
[EJT License Server](https://www.ej-technologies.com/license/files) Docker image.
> [!TIP]
> Want to be notified of new releases? Check out 🔔 [Diun (Docker Image Update Notifier)](https://github.com/crazy-max/diun)
> project!
___
* [Features](#features)
* [Build locally](#build-locally)
* [Image](#image)
* [Environment variables](#environment-variables)
* [Volumes](#volumes)
* [Ports](#ports)
* [Commands](#commands)
* [Usage](#usage)
* [Docker Compose](#docker-compose)
* [Command line](#command-line)
* [Upgrade](#upgrade)
* [Notes](#notes)
* [How to use your floating license?](#how-to-use-your-floating-license)
* [User groups](#user-groups)
* [Contributing](#contributing)
* [License](#license)
## Features
* Run as non-root user
* Multi-platform image
* License server customizable via environment variables
* Persistence of configuration in a single directory
* A custom base url can be provided to download the ejtserver tarball
## Build locally
```shell
git clone https://github.com/crazy-max/docker-ejtserver.git
cd docker-ejtserver
# Build image and output to docker (default)
docker buildx bake
# Build multi-platform image
docker buildx bake image-all
```
## Image
| Registry | Image |
|------------------------------------------------------------------------------------------------------|-------------------------------|
| [Docker Hub](https://hub.docker.com/r/crazymax/ejtserver/) | `crazymax/ejtserver` |
| [GitHub Container Registry](https://github.com/users/crazy-max/packages/container/package/ejtserver) | `ghcr.io/crazy-max/ejtserver` |
Following platforms for this image are available:
```
$ docker buildx imagetools inspect crazymax/ejtserver --format "{{json .Manifest}}" | \
jq -r '.manifests[] | select(.platform.os != null and .platform.os != "unknown") | .platform | "\(.os)/\(.architecture)\(if .variant then "/" + .variant else "" end)"'
linux/amd64
linux/arm64
linux/ppc64le
linux/s390x
```
## Environment variables
* `TZ`: The timezone assigned to the container (default `UTC`)
* `PUID`: EJT user id (default `1000`)
* `PGID`: EJT group id (default `1000`)
* `EJT_ACCOUNT_USERNAME`: Username of your EJT account to download the license server. Can be empty if you use a custom base url to download the ejtserver tarball without HTTP authentication
* `EJT_ACCOUNT_PASSWORD`: Password linked to the username
* `EJTSERVER_VERSION`: EJT License Server version to install. See the [official changelog](https://www.ej-technologies.com/license/changelog.html) for a curated list. (default `1.16.2`)
* `EJTSERVER_DOWNLOAD_BASEURL`: Base url where EJT License Server unix tarball can be downloaded (default `https://licenseserver.ej-technologies.com`)
* `EJTSERVER_LICENSES`: Your floating licenses (comma delimited)
* `EJTSERVER_DISPLAY_HOSTNAMES`: If you want to see host names instead of IP addresses (default `false`)
* `EJTSERVER_LOG_LEVEL`: [Log4J log level](https://logging.apache.org/log4j/2.x/manual/customloglevels.html) of the EJT License Server (default `INFO`)
> 💡 `EJT_ACCOUNT_USERNAME_FILE`, `EJT_ACCOUNT_PASSWORD_FILE` and
> `EJTSERVER_LICENSES_FILE` can be used to fill in the value from a file,
> especially for Docker's secrets feature.
## Volumes
* `/data`: Contains configuration and the downloaded EJT License Server unix tarball
In this folder you will find those files:
* `ejtserver_unix_*.tar.gz`: The downloaded EJT License Server unix tarball
* `ip.txt`: If you would like to allow only certain IP addresses, enter one IP address per line. If no IP addresses are entered, all IP addresses will be allowed. You can specify IP masks, such as 192.168.2.*
* `users.txt`: If you would like to allow only certain usernames, please enter one username per line. If no usernames are entered, all usernames will be allowed
> :warning: Note that the volumes should be owned by the user/group with the
> specified `PUID` and `PGID`. If you don't give the volume correct permissions,
> the container may not start.
## Ports
* `11862`: License server port
## Commands
You also have access to these commands from the container:
* `ejtserver`: This is the license server the daemon launch script. Commands available: `start|stop|run|run-redirect|status|restart|force-reload`.
* `admin`: Admin tool command line based of ejtserver. It allows you to list all active connections and to terminate selected connections. In addition, you can check out a temporary license for use in environments that have no access to the floating license server
Usage:
```bash
docker compose exec ejtserver admin list
```
## Usage
### Docker Compose
Docker compose is the recommended way to run this image. Copy the content of
folder [examples/compose](examples/compose) in `/var/ejtserver/` on your host
for example. Edit the compose and env files with your preferences and run the
following commands:
```bash
docker compose up -d
docker compose logs -f
```
### Command line
You can also use the following minimal command:
```bash
docker run -d -p 11862:11862 --name ejtserver \
-e TZ="Europe/Paris" \
-e EJT_ACCOUNT_USERNAME="my_ejt_username" \
-e EJT_ACCOUNT_PASSWORD="my_ejt_password" \
-e EJTSERVER_LICENSES="0-0123-0123456789" \
-v $(pwd)/data:/data \
crazymax/ejtserver:latest
```
## Upgrade
Recreate the container whenever I push an update:
```bash
docker compose pull
docker compose up -d
```
## Notes
### How to use your floating license?
[ej-technologies'](https://www.ej-technologies.com/) products offer a floating
license mode in the license dialog. Choose `Help -> Enter License Key` from the
main menu in the JProfiler GUI or the install4j IDE and select the
**Floating license** radio button.
The "Name" and "Company" fields are informational only, unless you choose to
restrict the allowed values for the "Name" field as described in README.TXT.
In the license server field you have to enter the hostname of the computer
where the license server is running. Instead of a host name, an IP address can
also be used.
If have a floating license for a certain major version of a product, you can
use older versions of the same product with that floating license as well.
Should you require any additional assistance, please contact
**support@ej-technologies.com**.
### User groups
If you want to partition keys to different groups of users, you can define
groups in the file `license.txt` and the access control files `users.txt` and
`ip.txt` by inserting group headers:
```
[group]
```
All entries after a group header belong to that group until a new group is
started. If no group has been started, entries are added to the "default" group.
Users are assigned to a group based on the defined groups in the access control
files. If users are defined in `users.txt`, the group is determined by the that
file. If the resulting group is the default group, the `ip.txt` file will be
used for determining the associated group. If the users.txt file is empty, only
the ip.txt file will be used.
In order to partition a single key to different groups in the `license.txt`
file, add the key to multiple groups with the following syntax:
```
n:key
```
where n is the number of concurrent users that should be assigned to the
current group. Use different values of `n` in different groups that add up to
the maximum number of current users for the `key`. For example:
```
[groupA]
4:F-95-10-xxx
[groupB]
6:F-95-10-xxx
```
splits the 10-user key F-95-10-xxx into 4 concurrent users for `[groupA]` and 6
concurrent users for `[groupB]`. In `users.txt`, the groups would be defined as:
```
[groupA]
bob
alice
...
[groupB]
carol
john
...
```
Alternatively, the `ip.txt` file could define groups as:
```
[groupA]
192.162.1.*
[groupB]
192.162.2.*
```
Group names are shown in the log file next to the username.
## Contributing
Want to contribute? Awesome! The most basic way to show your support is to star
the project, or to raise issues. You can also support this project by [**becoming a sponsor on GitHub**](https://github.com/sponsors/crazy-max)
or by making a [PayPal donation](https://www.paypal.me/crazyws) to ensure this
journey continues indefinitely!
Thanks again for your support, it is much appreciated! :pray:
## License
MIT. See `LICENSE` for more details.
And a special thanks to @ingokegel and [ej-technologies'](https://www.ej-technologies.com/)!
