Let’s talk about the Plesk Docker Extension
Docker is a software technology that provides containers. That’s an extra layer of abstraction and automation of operating-system-level virtualization. As a flexible Plesk tool, Docker can help you perform a wide variety of tasks. Today, I’ll show you how Docker can make your life easier – with examples.
Note: All examples in this article were made using the free version of the Docker extension for Plesk.
- All ports specified in the Docker file are, by default, exposed. In a cloud environment, you can usually make them available only from the local host using the Cloud firewall and the default Security Group. This can be both an advantage and a drawback.
- Always check whether your containers are accessible from the outside. Make sure to block outside access to the container unless it’s required
- You cannot set read-only permission. All volumes are always mapped with read-write permissions.
- You cannot use the Docker Compose tool and its configuration files.
Deploying and installing Plesk DockerTo deploy the environment and get your hands on this extension you’ll need to:
Plesk Docker Extension Use Cases
- On the Plesk forum, customers may ask about upgrading the vendor’s MySQL/MariaDB to the latest version.
- Some of your customers may want to use a web application requiring MySQL 5.7 or MariaDB 10.2. Others may want to use the latest version of the database server because of superior performance.
- A customer may want to have full control – not just over their databases, but over the MySQL server itself.
Web Application DeveloperImagine, you begin developing a new web application. The application will store its data in an SQL-like database. Which SQL-like database should you use? You probably want to write a web application that can work with all popular databases. This will help you get as many customers as possible. So, what databases do you know?
- Officially supported by Plesk (not a full list, only an example)
- MySQL 5.5/5.6/5.7
- MariaDB 10.0/10.1
- PostgreSQL 9.5
- Not supported by Plesk
- MySQL 8.0
- MariaDB 10.2
- PostgreSQL 9.6
- Something else?
- Microsoft SQL Server on Linux
- MySQL: https://hub.docker.com/_/mysql/
- MariaDB: https://hub.docker.com/_/mariadb/
- PostgreSQL: https://hub.docker.com/_/postgres/
- Search for available containers with MariaDB and select the required version.
- Download and wait for it to finish.
- Configure the required settings:
- Switch on auto-start.
- Configure port mapping.
- Add an environment variable with the ‘root’ user password.
- 4. Create a container and wait for it to launch.
WordPress AdministratorYou need to install the Memcached daemon to speed up WordPress and decrease CPU utilization. Note: You must disable access to Memcached from anywhere except WordPress, for security reasons. In this example, Plesk is deployed in Google Cloud and is protected by the Cloud Platform Firewall.Memcached
- Check your firewall settings.
- Make sure you’ve blocked all external connections to memcached.
- Search for Memcached container and install.
- Select the ‘auto-start’ checkbox and configure port mapping.
- Start the container. Check that it’s all running fine.
Small BusinessesSo you’re an organisation that wants to use a self-owned, Nextcloud-based resource for file sharing. Seriously, consider Plesk and Docker. You can do it in just a few clicks.
- Search for and deploy a container with Nextcloud. Wait for it to launch.
- Configure proxy rules for Docker under “Websites & Domains”.
- Open the Nextcloud web interface and set ‘admin’ username and password.
- All done! You can now use Nextcloud.
Developing in GoAlthough Plesk doesn’t have extensions for working with Go, you can still write an application in Go and run it on a Plesk server with Docker. And if you can’t write in Go for some reason, then you can deploy git-service written in Go.
Try out our new Plesk versionsIn case you missed it – You can even install Plesk in a Docker container using the Plesk with Docker extension! This way you can try out an early version of Plesk and check out the new features and extensions. But your publicly available websites will still work on a stable version of Plesk.