Custom Containers Deployment
The platform can automatically create custom containers from any standard Docker image that uses a supported OS and architecture. These images can be stored on Docker Hub or any other public or private registry. The containers benefit from the platform’s features like automatic scaling, logs, statistics, alerts, and configuration management while keeping the original software unchanged. However, the functionality of the application itself depends on the third-party image maintainers, not the platform.
This guide will show you how to start using custom Docker containers, including how to create and manage different applications and services from Docker Hub or your private registry.
Custom Containers from Docker Hub
Step 1. Click the New Environment button at the top-left corner of the dashboard to open the environment setup wizard.
Go to the Custom tab at the top of the wizard. On the left, you’ll see blocks for various layers, each allowing you to create a custom container from a chosen Docker image. Use these blocks to organize your setup as needed.
Choose the layer you need and click the Select Image button.
Step 2. In the Select Container frame, you’ll see a few tabs:
- Quick Start: Offers popular/recommended templates for the current layer (may not be available depending on your hosting service provider).
- Search: Let’s you find templates in the central Docker Hub registry.
- Custom: Allows you to add templates from custom/private registries.
- Favorite: Stores images for quick access that you plan to use in the future.
For example, to search the Docker Hub registry, go to the Search tab, type the full or partial name of the desired template (e.g., appsvcsample/static-site) in the search field, and press Enter.
The platform will display relevant results. Click on the desired template to add it to the chosen layer. You can select the needed tag from the drop-down list at the top. The search field helps manage images with multiple tags.
Note that Different Docker images can’t be added to the same layer. Use different layers to add more images. Extra blocks allow you to expand the topology as needed.
Click the Next button after you’ve finished setting up the topology.
Step 3. Once you’re back in the wizard with all your custom containers added, you can start configuring and managing them like any regular node:
Click the Create button at the bottom of the wizard to start creating the environment.
Step 4. That’s it! In a few minutes, your environment with custom containers will be created and shown on the dashboard.
You can open each container in your browser using the button next to it or open the entire environment via the assigned domain (displayed below the environment name). In this case, the application server or balancer layer’s template will open.
- Not all custom containers have a web interface running immediately. You might get a 502 application down error when accessing such a node in the browser. This doesn’t mean the image is incorrect. Check the running processes inside a container using an SSH connection to ensure the necessary service is working.
- If an application is deployed in a container without a public IP and isn’t listening on port 80, you’ll see a 502 – Service is down error page. Make sure your container has an HTTP service running and is set to handle incoming requests on port 80.
In our example, you can see a Docker application sample when opening the image in the browser.
You can make more configurations to this container directly in the dashboard, using the embedded file manager or Web SSH client. You have full root permissions to make the necessary adjustments.
Containers from Custom/Private Registry
Besides the public templates on Docker Hub, the platform lets you deploy your private images from any custom registry. These templates are stored in the Custom section, so you can manage them like public images. If your repository is protected, you’ll need to enter access credentials once when adding the image. After that, authentication for scaling or redeployment is automatic.
To add a custom image, go to the Custom section in the topology wizard.
Step 1. Switch to the Custom tab and click the Add New Image button.
Step 2. In the new window, enter your repository name in the appropriate field. When using Docker Hub, you can leave out the registry host.
If your repository is private, enter the Username and Password. Otherwise, leave these fields empty. Click Add to proceed.
Step 3. Your new template will be added to the custom images list in a few seconds, ready for deployment.
To remove an unused custom template, click the bin icon at the top-right corner of the image. You can mark custom images as Favorites using the star icon, just like regular images.
Step 4. To update access credentials for an existing custom container, hover over the appropriate layer in the dashboard, expand the Additionally list, and click Repo Credentials.
Step 5. In the Container Repository Credentials window, enter a new Login and Password for your image. Click the Apply button to save changes.
That’s it! Now you know how to add custom containers from non-default repositories to the platform.