.. _Docker:
🐳 Docker
=========
We've dedicated `Docker `_ development & production servers:
- ``dev1.[pvt|pub].confirm.ch`` or simply ``dev.confirm.ch`` for all **development** environment
- ``prod1.pub.confirm.ch`` or simply ``prod.confirm.ch`` for all **live** environments
All inbound requests will be routed via the :ref:`proxy`.
We're also running our own :ref:`Docker registries` which can be used to push Docker images.
Docker CI file
--------------
Since we're using :ref:`Shared GitLab CI files`, feel free to use the `Docker CI file `_ to build & deploy images with ease.
Health checks
-------------
Please ensure you add proper health checks to your Docker images by providing a `HEALTHCHECK `_ Dockerfile directive.
.. hint::
Docker will automatically restart crashed containers. However, unhealthy containers won't be restarted automatically.
Thus we've a rather simple `Healer `_ container which restarted unhealthy containers.
Portainer
---------
To view & manager the running containers on the Docker hosts, we're using `Portainer `_.
.. hint::
You can login with your LDAP credentials. However, please note that someone needs to assign admin access to your account after the first login.
Development GitLab runners
--------------------------
There are 2 registered and shared GitLab runners running on the development server.
The runners can be used to test & build applications.
Use the following :ref:`GitLab CI` tags to access the runners:
- ``dev docker``: To run a job in a Docker container on the development server (i.e. *Docker executor*)
- ``dev shell``: To run a job directly in the shell on development server (i.e. *Shell executor*)
.. important::
Use the ``dev shell`` tags only for deploying Docker containers (i.e. ``docker-compose``).
For everything else, use the ``dev docker`` tags and thus the Docker executor.
.. _Docker further subtopics:
Further subtopics
-----------------
.. toctree::
:maxdepth: 1
:glob:
docker/*