Plesk & SocialBee have teamed up. Save 30% now!

Plesk on Docker

Docker has been a hot topic this year. Modern software should have an option to be installed as a Docker container. Not long ago we have created a Docker image for Plesk. This article describes how to install and use Plesk Docker container.

Installation

The official Docker image of Plesk has already been published on Docker Hub. It means that the installation is very simple. Versions 12.0 and 12.5 are available, and 12.5 is marked with the “latest” tag.

Docker has an excellent desktop client called Kitematic we will be using to install Plesk as a Docker container. The procedures described below presume that you have already installed Kitematic (Docker Toolbox).

In order to install Plesk, click the “+ NEW” button, type “plesk” in the search field, hit the Enter key, and click “Create” inside the box describing the Plesk image to create a container with Plesk.

Docker Container with Plesk

Once the container creation process has finished, you need to log in to Plesk. Docker uses port mapping, and we need to find a mapping for port 8880.

Docker container with Plesk - ports configuration

Kitematic provides an additional convenience by presenting access URLs as links. So you can click one and you’ll see the Plesk login page open in your browser.

The default credentials for Plesk (as a Docker image) are:

  • Login: admin
  • Password: changeme

After logging in you will see the Plesk web interface.

Docker Container with Plesk - Backoffice

Another option to install a container with Plesk is to use the “docker” command line utility.

To create a container, use the following command:

docker run -d -it -p 8880:8880 plesk/plesk

This command will create a container with Plesk based on the “plesk/plesk” image. The next step is to open the URL of the Plesk web interface. It should look like this: http://< docker-host-ip >:8880

If you do not know the IP of your Docker host, use the “docker-machine” command to retrieve it:

docker-machine ip default

Where “default” is the name of the Docker host (“default” name is used in case of the Docker Toolbox installation).

Practical Usage

Why use Plesk as a Docker container? First of all, it could be used for evaluation purposes. The Plesk Docker image is already pre-configured and comes with a trial license. It means that you get a “ready-to-use” Plesk in a matter of a few seconds. There is no need to perform the installation process, look for the trial license key, and so on. You can start the evaluation process immediately.

Another option is to use Plesk as a Docker container in a way Plesk is regularly used in. Similar to VPS or dedicated server, Plesk as a Docker container can be used to provide shared hosting or satisfy “power user” needs (hosting domains for individual purposes). If you are already familiar with the Plesk image for Amazon, the Docker image will look pretty similar.

Known Limitations

Plesk packaging as a Docker image is still not mature, and there are some known limitations.

If you are using Ubuntu as the Docker host, please disable (or remove) AppArmor. At the moment,Plesk installation fails if AppArmor is enabled.

Manipulations with license could lead to a 502 error. To work around the problem, run the container in the privileged mode (–privileged  option for “docker run” command).

Try to avoid any manipulations with the hostname using the Plesk interface. At the moment, such manipulations could lead to errors.

Image Customization

Sooner or later, you will probably think of image customization. You may want to tinker with the configuration settings, customize the UI, or change the set of installed components.

If you want to fine-tune the original image, we strongly recommend to use the Plesk image as the base image (“FROM” directive in Dockerfile).

If you want to change the list of installed components, or have containers without some particular component, you need to customize the original Dockerfile of the Plesk image. Dockerfiles for Plesk are located on GitHub: https://github.com/plesk/docker/

Conclusion

There is a lot of buzz around Docker that is hard to ignore. The simplest way to understand the Docker purpose is to play around with an image (like Plesk) and create a bunch of containers. Earlier on, only some providers such as Amazon had the ability to create a new instance of Plesk within a few seconds, but now with the assistance of Docker, you can do it by yourselves in a very simple manner.

Additional Information

Here is the list of useful links:

You can use GitHub repo https://github.com/plesk/docker/ to submit issues or feature requests. Also feel free to send us pull requests.

6 Comments

  1. The license of this Docker image will expire?

  2. hi fellas, i am trying to run migration manager, but it fails when i access trought Tool and settings i believe is something related to url/port issue.

    trough Extension i can initiate the app but when i try to access the remote server trought shh credentials i got this:

    Failed to fetch basic information about resellers, clients and domains data from source servers
    Cause: Command execution failed on the local server with non-zero exit code.
    command: echo y | ssh-keygen -q -t rsa -P “” -f /usr/local/psa/var/modules/panel-migrator/sessions/20161202175440/ssh-keys/id_rsa.158.69.97.212
    exit code: 127
    stdout:
    stderr: /bin/sh: 1: ssh-keygen: not found

    thanks

  3. Is this a multi arch image, compatible with RMA architecture?
    Ref: https://engineering.docker.com/2019/04/multi-arch-images/

Add a Comment

Your email address will not be published. Required fields are marked *

GET LATEST NEWS AND TIPS

  • Yes, please, I agree to receiving my personal Plesk Newsletter! WebPros International GmbH and other WebPros group companies may store and process the data I provide for the purpose of delivering the newsletter according to the WebPros Privacy Policy. In order to tailor its offerings to me, Plesk may further use additional information like usage and behavior data (Profiling). I can unsubscribe from the newsletter at any time by sending an email to [email protected] or use the unsubscribe link in any of the newsletters.

  • Hidden
  • Hidden
  • Hidden
  • Hidden
  • Hidden
  • Hidden

Related Posts

Knowledge Base