Getting PlexGuide/Docker to work on OpenVZ

Daveid

PG Specialist
Tech Lead
Jun 22, 2018
20
21
8
Reactions
21 0 0
#1
PG Version
5.1
Server Type
Remote - VPS
UPDATE: Following the instructions on this page with your VPS host, it's possible to run Docker 1.10.3 on the OpenVZ platform (though I've read 1.7.1 was officially the last version to support kernel 2.6.x): https://openvz.org/Docker_inside_CT

If we use the Ubuntu repo to install Docker with this command:
Bash:
sudo apt-get install docker.io=1.10.3-0ubuntu6
You will get the following error after install:
FATA[0000] Your Linux kernel version 2.6.32-042stab125.5 is unstable running Docker. Please upgrade your kernel to 3.10+.

If you then run the following commands, Docker will run flawlessly!
Bash:
echo "JoinControllers=cpu,cpuacct,cpuset freezer,devices" >> /etc/systemd/system.conf
mkdir -p /etc/docker/ && echo '{"storage-driver": "vfs"}' > /etc/docker/daemon.json
echo "docker.io hold" | sudo dpkg --set-selections
sudo wget -qO docker "https://get.docker.com/builds/Linux/x86_64/docker-1.10.3" -P /usr/bin/
chmod +x /usr/bin/docker
Now you can try starting Docker and running Hello World as a test!
Bash:
sudo systemctl start docker
docker run hello-world
Here are the various sources for this old version of Docker, for archival purposes.

Official Github Source (Built for Ubuntu Trusty 14.04):
https://github.com/docker/engine/archive/v1.10.3.tar.gz

Official Ubuntu Source (Built for Ubuntu Xenial 16.04):
https://launchpad.net/ubuntu/+archi.../1.10.3-0ubuntu6/docker.io_1.10.3.orig.tar.gz

Official Docker Binaries:
https://get.docker.com/builds/Linux/x86_64/docker-1.10.3
https://test.docker.com/builds/Linux/x86_64/docker-1.10.3
 
Last edited:

Admin9705

Administrator
Project Manager
Jan 17, 2018
4,621
1,967
113
Reactions
1,967 0 0
#2
It just runs on the docker you have, but it may attempt to upgrade it. Im unsure until you test it :D But if it works, let me know and we can adopt it for PG6
 

Daveid

PG Specialist
Tech Lead
Jun 22, 2018
20
21
8
Reactions
21 0 0
#3
UPDATE: Good news, it's entirely possible! I was able to get Docker 1.10.3 working perfectly on CentOS 7 following the instructions on this page: https://openvz.org/Docker_inside_CT

This did require the cooperation of my VPS host as the first 6 commands need to be ran on the node, but luckily they had no complaints and was able to get this done for me within 24 hours.

Even crazier, I tweaked the PlexGuide install to work for CentOS just to see if I could get it working in that environment and it appears to be functioning as far as I can tell! All you really need to do is replace apt-get with yum throughout the script and you're pretty much in the clear. I was able to install Portainer and a few other utilities no problems.

To install the old version of Docker, I used this guide:
https://medium.com/@gauravsj9/how-to-install-specific-docker-version-on-linux-machine-d0ec2d4095
Ubuntu:
sudo apt-get install docker-engine=1.10.3-0~ubuntu-xenial
CentOS:
sudo yum install docker-engine-1.10.3-1.el7.centos

Now I'm going to wipe this machine and try again with Ubuntu 16.04, hopefully it will be successful.
 

Admin9705

Administrator
Project Manager
Jan 17, 2018
4,621
1,967
113
Reactions
1,967 0 0
#4
oh really? sometime i need to checkout, i'm rewriting PG to v6 and when that's done; i'll give it a test. I was looking forward to make this cross OS future wise also; ansible and docker keep it pretty simple.
 

Daveid

PG Specialist
Tech Lead
Jun 22, 2018
20
21
8
Reactions
21 0 0
#5
oh really? sometime i need to checkout, i'm rewriting PG to v6 and when that's done; i'll give it a test. I was looking forward to make this cross OS future wise also; ansible and docker keep it pretty simple.
Yeah I definitely think it can be done with relative ease! btw I have more success to report, Docker & PlexGuide are now working on Ubuntu 16.04 through OpenVZ :)

There's three important pieces you need to do after installing Docker 1.10.3, and that's the following:
Bash:
echo "JoinControllers=cpu,cpuacct,cpuset freezer,devices" >> /etc/systemd/system.conf
mkdir -p /etc/docker/ && echo '{"storage-driver": "vfs"}' > /etc/docker/daemon.json
The first two commands will make it so Docker will actually run without encountering errors. Finally, we'll want to freeze Docker so it's not automatically updated:
Bash:
echo "docker.io hold" | sudo dpkg --set-selections
There might be a way to script this out to auto-detect the user's kernel and apply this fixes so it works without manual intervention, depending on how you feel about supporting an older version of Docker. Personally I'm thinking of moving to a beefier KVM, but I already got the OpenVZ VPS for $7 so figured I'd give it a go.
 
Last edited:

PG Developer Donations

 

Forum statistics

Threads
2,894
Messages
18,193
Members
5,801
Latest member
britnick1972