Docker

Zentyal integrates Docker [1] and Portainer Community Edition (CE) [2] to create and manage a dockerized environment.

Warning

This module is currently in the Beta version and may undergo changes in the coming weeks. Therefore, it is not recommended for production use yet.

[1]https://docs.docker.com/get-started/overview/
[2]https://docs.portainer.io/

General configuration

Through the menu Docker we can access the general configuration of the service.

_images/docker-general.png

Docker module configuration

In this section we can modify the following parameters:

Persistent volume name:
Name of the volume that will be used by the Portainer container for its data persistence.
Container name:
Name of the container Portainer will use.
Administration port:
Port to manage Portainer.

Warning

Once the module is enabled, if we change any of the values of this form, the container and its volume will be eliminated to be created from scratch.

IMPORTANT: This is not already implemented, therefore, if a change is made with the module enabled, you’ll have to manually delete the container and its volume beforehand to avoid issues while saving changes.

Initial configuration

Once we have the module enabled, we can access the administration panel using our Zentyal IP along with the port defined in the module configuration.

_images/docker-admin_setup.png

Portainer admin user initial setup

Warning

We will get a notice that the site is not trustworthy, this is because the certificate is self-signed.

As we can see, the first time the Portainer container is created, it tells us that we have to create the user Portainer administrator. Once established, we can log in and start using Portainer.

_images/docker-dashboard.png

Portainer admin panel

Example of using Portainer locally

Below is a simple example in which a container will be created with Nginx locally, which will listen on port 9090. To do this, we do the following from the Portainer administration panel:

  1. We go to the top menu Home:
_images/docker-sample_home.png

Access to environments created in Portainer

  1. We select the Local environment, which is our own Zentyal server:
_images/docker-sample_environment.png

List of available environments

  1. We select Container:
_images/docker-sample_container.png

List of menus specific to the environment

  1. Click on Add container:
_images/docker-sample_new-container.png

List of existing containers

  1. We establish the simple values for the container and click on Deploy the container:
_images/docker-sample_container-creation.png

Nginx container configuration

Warning

Container creation may take a few minutes as the established image must be downloaded from Docker Hub.

_images/docker-sample_list-containers.png

List of existing containers

  1. We create a network service and set the port of our container:
_images/docker-sample_network-service.png

Network service

  1. We create the rule in the firewall:
_images/docker-sample_firewall.png

Firewall rule

  1. We verify access:
_images/docker-sample_nginx.png

Nginx home page

[3]https://hub.docker.com/_/nginx
[4]https://hub.docker.com/