Difference between revisions of "Docker"

From Univention Wiki

Jump to: navigation, search
 
(9 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{Version|UCS=4.0}}
+
{{Version|UCS=4.4}}
  
 
= Docker with UCS =
 
= Docker with UCS =
  
[https://www.docker.com/ Docker] is an open-source project that automates the deployment of applications inside software containers.
+
UCS supports running [https://opensource.com/resources/what-docker Docker] containers. The docker.io Debian package is installed by default since the App Center uses Docker containers to deploy applications on UCS systems.
  
== Installation ==
+
Additionally, [https://hub.docker.com/u/univention Docker Hub] hosts a couple of ''VM-style'' containers that allow to run a full UCS userspace as a container, which may be interesting in special scenarios. There are role specific images like the [https://hub.docker.com/r/univention/ucs-master-amd64 UCS DC Primary Image] as well as a [https://hub.docker.com/r/univention/ucs-generic-amd64 UCS Generic Image], which can be configured into any UCS server role. This was the result of early experiments with docker, which doesn't follow the general purpose of docker containers. At the time of writing Docker containers in general [https://github.com/moby/moby/issues/14856 still] have [https://github.com/moby/moby/issues/11185 challenges with the exposure of wide dynamic port ranges], so running services like Samba/AD in these ''VM-style'' is not recommended.
 
 
docker packages can be installed with the following commands
 
<source lang=bash>
 
ucr set repository/online/component/docker=enabled \
 
        repository/online/component/docker/unmaintained=enabled
 
univention-install docker.io
 
</source>
 
 
 
After that, docker is ready to use:
 
<pre>
 
~# docker -v
 
Docker version 1.3.2, build 39fa2fa
 
</pre>
 
 
 
A UCS docker image can be downloaded by the following command
 
<pre>
 
docker pull univention/generic-ucs-4.0-1-update-amd64
 
</pre>
 
 
 
Then, a new UCS docker container can be started in the following way
 
<pre>
 
docker run -d -e rootpwd=univention --hostname=dockertest \
 
  --name=dockertest_container -e nameserver1="$(ucr get nameserver1)" \
 
    -p 8011:80 univention/generic-ucs-4.0-1-update-amd64 /sbin/init
 
</pre>
 
 
 
A shell in the docker container can be started by
 
<pre>
 
docker exec -it dockertest_container /bin/bash
 
</pre>
 
 
 
The started docker container can easily be configured through the web based appliance setup wizard. In the example above the port 8011 of the docker host is redirected to the port 80 of the container. Thus, the HTTP port of the docker container can reached by typing http://<IP of the docker host>:8011.
 
  
 
[[Category:Development]]
 
[[Category:Development]]
 
+
<!--[[Category:Docker]]-->
[[Category:Docker]]
 

Latest revision as of 10:28, 9 July 2020

Produktlogo UCS Version 4.4

Docker with UCS

UCS supports running Docker containers. The docker.io Debian package is installed by default since the App Center uses Docker containers to deploy applications on UCS systems.

Additionally, Docker Hub hosts a couple of VM-style containers that allow to run a full UCS userspace as a container, which may be interesting in special scenarios. There are role specific images like the UCS DC Primary Image as well as a UCS Generic Image, which can be configured into any UCS server role. This was the result of early experiments with docker, which doesn't follow the general purpose of docker containers. At the time of writing Docker containers in general still have challenges with the exposure of wide dynamic port ranges, so running services like Samba/AD in these VM-style is not recommended.

Personal tools