Docker
Clustering a Docker Container
These steps show the process of creating a Clustered docker container. The container will be created using
a standard docker compose.yaml
file.
-
Navigate to HA-Cluster -> Docker in the webapp:
-
Click
Cluster a Docker application
to get to the creation/addition page and fill in the fieldsAvailable options:
- Select HA Service - Select the service/pool to associate the container to in the event of a failover
- Container Description - Optional description of the container
- Location of
compose.yaml
file within selected service - The path in the selected pool/service to save the compose.yaml - Contents of
compose.yaml
file - Enter the contents of thecompose.yaml
file for the container - An Example
compose.yaml
:
services: apache: image: httpd:latest container_name: my-apache-app ports: - 8080:80 volumes: - ./website:/usr/local/apache2/htdocs restart: no
Warning
When adding your content, make sure to add
restart: no
to your service configurations. RSF-1 will manage the restart of clustered containers in the event of a failover -
When finished click
Create
. -
By default the container will remain stopped until started. Click the
Start
button to spin up the container.