Docker & LXD support

Last updated: April 5th 2022

Docker support in Webdock

DO NOT attempt to run docker on a Debian instance: At this time, Debian has more than one issue with Docker on our platform and most likely your containers will simply not work if you try to run them under Debian.

We have created a series of guides which show you how to install and work with Docker on Webdock. Essentially you can install Docker as you normally would on any system but you have to make sure you change over to the fuse-overlayfs storage driver.

Click here to view the Webdock Docker Installation Guides

If you have already installed Docker and want to save on disk space

Please refer to our guide on how to change the docker storage driver to fuse-overlayfs in an existing installation:

How to change the Docker storage driver

 

LXD Support in Webdock

Webdock now fully supports nested LXD containers. LXD is similar in functionality to Docker, and is a great alternative.

To create an LXD container in your Webdock server, simply initialize LXD and accept all the defaults (comes pre-installed on all our Ubuntu systems) and off you go. The setup process would look something like the following. Please note the security.nesting=true in the launch / init command parameters:

root@testnesting:~# lxc init ubuntu c2 -c security.nesting=true 
If this is your first time running LXD on this machine, you should also run: lxd init 
To start your first container, try: lxc launch ubuntu:16.04 

Creating c2 
The local image 'ubuntu' couldn't be found, trying 'ubuntu:' instead. 
Error: Failed container creation: No storage pool found. Please create a new storage pool. 
root@testnesting:~# lxd init 
Would you like to use LXD clustering? (yes/no) [default=no]:  
Do you want to configure a new storage pool? (yes/no) [default=yes]:  
Name of the new storage pool [default=default]:  
Would you like to connect to a MAAS server? (yes/no) [default=no]:  
Would you like to create a new local network bridge? (yes/no) [default=yes]:  
What should the new bridge be called? [default=lxdbr0]:  
What IPv4 address should be used? (CIDR subnet notation, “auto” or “none”) [default=auto]:  
What IPv6 address should be used? (CIDR subnet notation, “auto” or “none”) [default=auto]:  

We detected that you are running inside an unprivileged container. 
This means that unless you manually configured your host otherwise, 
you will not have enough uids and gids to allocate to your containers. 

LXD can re-use your container's own allocation to avoid the problem. 
Doing so makes your nested containers slightly less safe as they could 
in theory attack their parent container and gain more privileges than 
they otherwise would.                                                                                                              
                                                                                                                                  
Would you like to have your containers share their parent's allocation? (yes/no) [default=yes]:                                    
Would you like LXD to be available over the network? (yes/no) [default=no]:                                                        
Would you like stale cached images to be updated automatically? (yes/no) [default=yes]                                             
Would you like a YAML "lxd init" preseed to be printed? (yes/no) [default=no]:                                                     
root@testnesting:~# lxc launch ubuntu c2 -c security.nesting=true 
Creating c2 
The local image 'ubuntu' couldn't be found, trying 'ubuntu:' instead. 
Starting c2                                  
root@testnesting:~# lxc ls 
+------+---------+--------------------+-----------------------------------------------+------------+-----------+ 
| NAME |  STATE  |        IPV4        |                     IPV6                      |    TYPE    | SNAPSHOTS | 
+------+---------+--------------------+-----------------------------------------------+------------+-----------+ 
| c2   | RUNNING | 10.5.99.151 (eth0) | fd42:4e3c:4243:492c:216:3eff:fee0:dffd (eth0) | PERSISTENT | 0         | 
+------+---------+--------------------+-----------------------------------------------+------------+-----------+ 
root@testnesting:~# lxc exec c2 bash 
root@c2:~# ping google.com 
PING google.com (172.217.21.174) 56(84) bytes of data. 
64 bytes from arn11s03-in-f14.1e100.net (172.217.21.174): icmp_seq=1 ttl=52 time=29.9 ms
....
We use cookies. Please see our Privacy Policy.