Creating and Configuring Docker-enabled Containers
To create a Parallels Container ready for running Docker containers, do the following:
-
Create a Container with a guest OS for which a Docker application template is available. For example:
# vzctl create 101 --ostemplate centos-7-x86_64
In the current version of Parallels Cloud Server, Docker application templates are available for these guest operating systems:
-
Configure network access in the Container. For details, see
Configuring Network Settings
.
-
Enable bridges in the Container. For example:
# vzctl set 101 --features bridge:on --save
-
Allow all
iptables
modules for the Container. For example:
# vzctl set 101 --netfilter full --save
-
Start the Container. For example:
# vzctl start 101
-
Install the Docker application template into the Container. For example:
# vzpkg install 101 docker
To check that Docker is configured correctly, you can create a test Docker container inside the configured Parallels Container. For example:
-
Increase Container RAM and diskspace for running multiple Docker containers. For example:
# vzctl set 101 --ram 4G --save
# vzctl set 101 --diskspace 25G:25G --save
-
Launch MySQL:
# docker run --name test-mysql -e MYSQL_ROOT_PASSWORD=123qwe -d mysql
-
Launch WordPress:
# docker run --name test-wordpress --link test-mysql:mysql -p 8080:80 -d wordpress
-
Log in to your WordPress installation by visiting the IP address of the Parallels Container at port 8080.
Note:
For more information about Docker, visit
http://docs.docker.com/
.
Restrictions and Limitations
-
Checkpointing and live migration of Parallels Containers with Docker containers inside is not supported.
-
During
vzreboot
operation, Parallels Containers with Docker containers inside are restarted instead of being suspended and resumed.
-
Only the
vfs
Docker graph driver is currently supported.
-
Bridges cannot be created inside Docker containers running inside a Parallels Container. (You can create bridges inside Parallels Containers as usual.)
|