From b51a07af249aa6f6e0b28a0433b1506e18d69219 Mon Sep 17 00:00:00 2001 From: Manuel Bentele Date: Thu, 29 Oct 2020 18:35:36 +0100 Subject: [BUILD] add CMake support to build docker images based on Ubuntu 20.04 --- README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index aae3426..41a80d6 100644 --- a/README.md +++ b/README.md @@ -143,6 +143,34 @@ make source This target creates compressed archives (\*_source.tar.gz and \*_source.zip) containing the source code of this repository for code distribution purposes. +### Docker image +A docker image of the built dnbd3 components can be created in the `Release` build configuration with the option `DNBD3_KERNEL_MODULE=OFF`. + +Make sure that your docker daemon runs and you are a member of the `docker` group to access the docker deamon without any super user privileges. Then build the docker image by calling the following Make target: + +``` +make docker-ubuntu-20-04 +``` + +The built docker image is saved as archive file (\*_ubuntu-20-04_docker.tar) and can be deployed to other machines and can be loaded with the following docker client call: + +```shell +docker image load -i *_ubuntu-20-04_docker.tar +``` + +After the loading of an image, a docker container named `NAME` and with the IPv4 adrress `IPv4_ADDRESS` can be created with the following docker client call: + +``` +docker container create --name --ip +``` + +Note that the image is already tagged with a `IMAGE_TAG` that is set to the current dnbd3 package version number. The image tag `IMAGE_TAG` can be reused to create a container. Finally, this container can be started to execute the dnbd3-server in this container with the following docker client call: + +``` +docker container start -a +``` + + ## Configuration of _dnbd3-server_ The dnbd3-server is started according to the following command line call. -- cgit v1.2.3-55-g7522