Difference between revisions of "Docker"
From Univention Wiki
Line 28: | Line 28: | ||
<pre> | <pre> | ||
docker run -d -e rootpwd=univention --hostname=dockertest \ | docker run -d -e rootpwd=univention --hostname=dockertest \ | ||
− | --name= | + | --name=dockertest_container -e nameserver1="$(ucr get nameserver1)" \ |
− | -p 8011:80 univention/ucs-4.0-1-generic-amd64 | + | -p 8011:80 univention/ucs-4.0-1-generic-amd64 /sbin/init |
</pre> | </pre> | ||
A shell in the docker container can be started by | A shell in the docker container can be started by | ||
<pre> | <pre> | ||
− | docker exec -it | + | docker exec -it dockertest_container /bin/bash |
</pre> | </pre> | ||
Revision as of 11:36, 21 April 2015
Docker with UCS
Docker is an open-source project that automates the deployment of applications inside software containers.
Installation
docker packages can be installed with the following commands
ucr set repository/online/component/docker=enabled \
repository/online/component/docker/unmaintained=enabled
univention-install docker.io
After that, docker is ready to use:
~# docker -v Docker version 1.3.2, build 39fa2fa
A UCS docker image can be downloaded by the following command
docker pull univention/ucs-4.0-1-generic-amd64
Then, a new UCS docker container can be started in the following way
docker run -d -e rootpwd=univention --hostname=dockertest \ --name=dockertest_container -e nameserver1="$(ucr get nameserver1)" \ -p 8011:80 univention/ucs-4.0-1-generic-amd64 /sbin/init
A shell in the docker container can be started by
docker exec -it dockertest_container /bin/bash
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.