ServerKit ¶
The IDLive Doc Server is built on the top of the Ubuntu 20.04 base image. If you wish to use your own base image, you need the Server Kit. It is a bundle that contains IDLive Doc Server's files and a Dockerfile to produce the final image.
The Server kit requires:
- Docker 18.09+
- Prepared base image
- IDLive Doc SDK bundle
- IDLive Doc license
Prepare base image¶
The base image should use Linux distribution that satisfy these requirements:
- Built for x86-64 architecture.
- Based on glibc 2.27+ and Bash. You can't use Alpine Linux.
- Uses deb or rpm based Package Manager.
You need to setup the image as required by the IDLive Doc Server:
- Install Java 17+.
- Create a user and a group named server.
If you use the GPU build you should also install the CUDA runtime.
This is an example of the Dockerfile for the image based on Ubuntu:
FROM ubuntu:20.04
RUN apt-get update \
&& apt-get install -y openjdk-17-jre-headless \
&& rm -rf /var/lib/apt/lists/*
RUN useradd --create-home server
Red Hat Universal Base Image 9
On Red Hat UBI 9 you need to additionally install chkconfig
package:
yum install chkconfig -y
Without it you can get Unsupported Linux distribution
error.
Build server image¶
First, unpack the Server Kit bundle:
mkdir -p serverkit && tar zxf docsdk-serverkit.tar.gz -C serverkit --strip-components=1
Once you've unpacked the Server Kit's archive, there will be a docsdk
directory there. You need to unpack the IDLive Doc SDK bundle into this directory. Make sure there is no intermediary directories:
tar zxf docsdk-linux.tar.gz -C serverkit/docsdk --strip-components=1
Next, unzip the license files into the docsdk/license
directory:
unzip -j idld-license-hasp.zip -d serverkit/docsdk/license
Finally build the server image with Docker in the BuildKit mode. Use the build argument FROM
to specify the base image:
export DOCKER_BUILDKIT=1
docker build . --tag idlivedoc-server --build-arg FROM=base-image
If you can't use BuildKit, there is a Dockerfile that works without it:
docker build . --file Dockerfile.nobuildkit --tag idlivedoc-server --build-arg FROM=base-image
Note that in this case the resulting image will be bigger in size.