Plesk

Using Docker – Container Settings

Note: If you want to change container settings, you do not need to stop the
container: When you save new settings, Plesk recreates the container.

To edit container settings, go to Settings or Details >
Settings.

Limiting memory

By default, using RAM in a Docker container is unlimited. To limit using
RAM, clear the Unlimited checkbox and enter the limit value in
megabytes in the Memory limit field.

Note: CPU and Disk usage cannot be limited for a Docker container at the
moment.

Note: Docker containers are administrator-level objects, and are not
controlled by subscription-level cgroup limits (CPU, RAM, Disk
usage).

Automatic Start

If the option Automatic start after system reboot is not selected,
then after system reboot the websites that use this container might be
down and you will need to start the container manually.

Port Mapping

By default, Automatic port mapping is turned on and the container’s
external port is mapped to a random port on the host system (for
example, 32768).

To change the port on the host system, clear the option Automatic port
mapping
and specify another external port in Manual mapping. If no
Manual mapping appears when you clear the check box, it means that
the container does not expose ports.

Warning: If port mapping is configured, Docker binds to the specified port on
all network interfaces of the host system. Usually, this means that
the application can be accessed from anywhere. Docker presumes that
authentication is carried out by the application itself, but
sometimes it is not so (for example, MySQL does not allow anonymous
access by default, but redis does).

Plesk cannot determine what service is installed in a specific Docker
container, and cannot control access to it. If you need to prohibit
access to the application from outside Plesk, do it manually using
the firewall on the host system.

Volume Mapping

Docker volumes are directories on your server mounted to a Docker
container, so that you have persistent storage that can be accessed from
your host system. The data in Docker volumes can be backed up, and, more
importantly, it is not deleted when you stop or delete a container.

For more information about data in containers, refer to the Docker
documentation
.

To add a volume mapping, specify the following:

To map more directories, click Add Mapping.

Setting Environment Variables

Environment variables are used by the application inside a container.
You might need to add more variables or edit existing variables. Plesk
allows you to add as many variables as required.