Notice
Docker (HOW-TO)
This thread also has a how-to guide how to install Docker on ClearOS 7.x. Please scroll down for the how-to.
Link to how-to post in this thread.
Hi,
Out of curiosity has anyone already fiddled with docker on ClearOS 7.1 Community?
Edit Saturday, 5 March 2016: Here some information from the Docker site:
What is Docker?
How is this different from virtual machines?
Hypervisor:
Docker:
Edit Monday, 7 March 2016: Note: Docker is coming to ClearOS
Edit Friday, 25 March 2016: The original Docker topic can be found HERE. This was a feature request for ClearVM. I started this topic with the question or someone already had fiddled with Docker on ClearOS Community. Later I started a investigation how to install Docker on ClearOS community you can find this information in this thread. One thing I can say Docker is really awesome!!!
Link to how-to post in this thread.
Hi,
Out of curiosity has anyone already fiddled with docker on ClearOS 7.1 Community?
Edit Saturday, 5 March 2016: Here some information from the Docker site:
What is Docker?
Docker containers wrap up a piece of software in a complete filesystem that contains everything it needs to run: code, runtime, system tools, system libraries – anything you can install on a server. This guarantees that it will always run the same, regardless of the environment it is running in.
How is this different from virtual machines?
Hypervisor:
Docker:
Edit Monday, 7 March 2016: Note: Docker is coming to ClearOS
Edit Friday, 25 March 2016: The original Docker topic can be found HERE. This was a feature request for ClearVM. I started this topic with the question or someone already had fiddled with Docker on ClearOS Community. Later I started a investigation how to install Docker on ClearOS community you can find this information in this thread. One thing I can say Docker is really awesome!!!
Share this post:
Accepted Answer
@Marcel
Currently working on planning to get Docker to run on ClearOS and then ClearVM. Here is a projected Roadmap specifically focusing on ClearVM.
NOTE: We are currently looking to update the ClearVM installer and then the integrations between ClearOS and ClearVM.
Thank you for all you do and your patience as new chapter(s) are opening.
Currently working on planning to get Docker to run on ClearOS and then ClearVM. Here is a projected Roadmap specifically focusing on ClearVM.
NOTE: We are currently looking to update the ClearVM installer and then the integrations between ClearOS and ClearVM.
Thank you for all you do and your patience as new chapter(s) are opening.
Responses (72)
-
Accepted Answer
Install Docker on ClearOS 7.x
***Important please try this first in a VM***
Docker needs at least kernel version:
3.10.0-229.el7.x86_64
My VM of ClearOS 7.2 Community has:
uname -r
3.10.0-327.10.1.v7.x86_64
Make sure ClearOS is updated
yum update
Copy past the followingl:
sudo tee /etc/yum.repos.d/docker.repo <<-'EOF'
[dockerrepo]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/centos/7/
enabled=1
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg
EOF
Install Docker:
yum install docker-engine
Packages being installed
Dependencies Resolved
===========================================================================================================================================================================================================
Package Arch Version Repository Size
===========================================================================================================================================================================================================
Installing:
docker-engine x86_64 17.03.0.ce-1.el7.centos dockerrepo 19 M
Installing for dependencies:
audit-libs-python x86_64 2.6.5-3.el7_3.1 clearos-centos-verified 70 k
checkpolicy x86_64 2.5-4.el7 clearos-centos-verified 290 k
docker-engine-selinux noarch 17.03.0.ce-1.el7.centos dockerrepo 28 k
libcgroup x86_64 0.41-11.el7 clearos-centos-verified 65 k
libseccomp x86_64 2.3.1-2.el7 clearos-centos-verified 56 k
libsemanage-python x86_64 2.5-5.1.el7_3 clearos-centos-verified 104 k
policycoreutils-python x86_64 2.5-11.el7_3 clearos-centos-verified 445 k
python-IPy noarch 0.75-6.el7 clearos-centos-verified 32 k
setools-libs x86_64 3.3.8-1.1.el7 clearos-centos-verified 612 k
Transaction Summary
===========================================================================================================================================================================================================
Install 1 Package (+9 Dependent packages)
Total download size: 20 M
Installed size: 70 M
Is this ok [y/d/N]:
Start Docker:
service docker start
Verify that Docker is installed and running.
docker version
[root@localhost /]# docker version
Client:
Version: 1.11.2
API version: 1.23
Go version: go1.5.4
Git commit: b9f10c9
Built: Wed Jun 1 21:23:11 2016
OS/Arch: linux/amd64
Server:
Version: 1.11.2
API version: 1.23
Go version: go1.5.4
Git commit: b9f10c9
Built: Wed Jun 1 21:23:11 2016
OS/Arch: linux/amd64
Start Docker at boot
systemctl enable docker
Run/install "hello-world" container (Docker first search if the hello-world is install. If not it download and installs the container.
docker run hello-world
Output:
Hello from Docker.
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker Hub account:
https://hub.docker.com
For more examples and ideas, visit:
https://docs.docker.com/userguide/
You can also check if the docker image has downloaded with:
docker images
Output:
REPOSITORY TAG IMAGE ID CREATED SIZE
hello-world latest 690ed74de00f 5 months ago 960 B
You can also check for running containers with:
docker ps
[root@gandalf completed]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
daecb2648b28 linuxserver/nzbget "/init" 23 minutes ago Up 23 minutes 0.0.0.0:6789->6789/tcp nzbget
You see that NZBGet is running on my ClearOS server. -
Accepted Answer
So Lets install a container. I want to start with Transmission. I've chosen the Transmission Docker container of Timhaak.
Let's pull the Docker image
docker pull timhaak/transmission
Output:
Using default tag: latest
latest: Pulling from timhaak/transmission
203137e8afd5: Pull complete
2ff1bbbe9310: Pull complete
933ae2486129: Pull complete
a3ed95caeb02: Pull complete
034aa1c3a6d2: Pull complete
984bc5ae85b6: Pull complete
720635f94c7e: Pull complete
23361b0d8c86: Pull complete
fcbe723cf60a: Pull complete
e7740d5b3ca8: Pull complete
Digest: sha256:6488d2e615475afdc0aba9b2def2e20cc46fdcb5c4366e7bffe96c889789af68
Status: Downloaded newer image for timhaak/transmission:latest
[/docker]
We can check if the image is downloaded with:
docker images
Output:
REPOSITORY TAG IMAGE ID CREATED SIZE
timhaak/transmission latest 01bbfd5d4ab8 9 hours ago 355.2 MB
hello-world latest 690ed74de00f 5 months ago 960 B
So now let's see the command how to start the container:
docker run -d -v /var/flexshare/shares/transmission/watch:/watch -v /var/flexshare/shares/transmission/complete-downloads:/downloads -v /var/flexshare/shares/transmission/incomplete-downloads:/incomplete -v /usr/docker/appdata/transmission:/config -p 45555:45555 -p 9091:9091 -e USERNAME=user -e PASSWORD=transmission timhaak/transmission
We run the container in deamon mode "-d" You see some mappings they begin with "-v" The directories inside the container are mapped to outside flexshares. Of course you have to create the flexshares. Also you have to create a directory appdata so the config of transmission is stored outside of the container. Then we have some port mappings beginning with "-p". We set the user and password with "-e".
Let's run the container!
Now check with:
docker ps
Output:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
86fcbc4412bb timhaak/transmission "/start.sh" 13 minutes ago Up 13 minutes 0.0.0.0:9091->9091/tcp, 0.0.0.0:45555->45555/tcp stoic_snyder
You can access the container with the ip-address of your ClearOS server and port number "9091".
http://IpAddressClearosServer:9091
-
Accepted Answer
-
Accepted Answer
I Didn't expect a answer. I posted several times in the ClearVM forums asking for a update. Now boom 15 minutes after I posted. I suppose at that time there was nothing news report...
I'm surprised Docker is coming to ClearOS and integration of ClearVM and ClearOS is new to me. Very awesome news!
Michael, thank you for sharing this with us. If you ask my opinion you should do that a lot more tell the community whats is going om behind te scenes.
I want to do a lot more! Maybe I'm bit frustrated at moment of this community and how things going but I care about this community.... -
Accepted Answer
@Marcel - Thank you for caring about the ClearOS Community and for your years of dedication! Know many folks are working hard to serve the Community while balancing building better Products. Currently engaging in constructive interactions only and specifically when we have material advancements to report.
Appreciate you helping to improve the Community morale when and where possible. -
Accepted Answer
Michael Proper wrote:
@Marcel - Thank you for caring about the ClearOS Community and for your years of dedication! Know many folks are working hard to serve the Community while balancing building better Products. Currently engaging in constructive interactions only and specifically when we have material advancements to report.
Thank you for the kind words. I always used ClearOS with pleasure
Of course that is understandable Rome was not built in a day either this also apply for ClearOS and other ClearCenter products. Software development takes time.
Appreciate you helping to improve the Community morale when and where possible.
Okay, I'll try but I love to see more devs on the forums. I think this is essential for the forums. Maybe the unofficial moderators (Nick, Tony, Tim, me, are there more?) have to discuss in a topic how to proceed further. How to get a positive buzz in the forums...
Something else I don't know if you have notice this in a other topic but is it possible to get a preview button next to the reply button so the person posting can check his post before the post goes live (I do not know of the forum software has the capability)? -
Accepted Answer
Michael Proper wrote:
@Marcel
Currently working on planning to get Docker to run on ClearOS and then ClearVM. Here is a projected Roadmap specifically focusing on ClearVM.
NOTE: We are currently looking to update the ClearVM installer and then the integrations between ClearOS and ClearVM.
Thank you for all you do and your patience as new chapter(s) are opening.
Just planning or are the devs all ready working on the code? If the latere applies then I filldle a bit further with Docker. -
Accepted Answer
Marcel van Leeuwen wrote:
Michael Proper wrote:
@Marcel
Currently working on planning to get Docker to run on ClearOS and then ClearVM. Here is a projected Roadmap specifically focusing on ClearVM.
NOTE: We are currently looking to update the ClearVM installer and then the integrations between ClearOS and ClearVM.
Thank you for all you do and your patience as new chapter(s) are opening.
Just planning or are the devs all ready working on the code? If the latere applies then I filldle a bit further with Docker.
Fiddle a bit further as we are focused on the ClearVM installer currently and this will not impact anything regarding the Docker topic. -
Accepted Answer
Okay, clear thank you!
At the moment I figuring out what I want. I have no dedicated hardware for a ClearOS server. Just deleted my ClearOS test VM because the server where it was running on is for the moment my main storage box. I'm considering selling the Synology what I use for storage since 2013. I'm going to setup a new ClearOS 7.2 test VM so i can fiddle a bit. -
Accepted Answer
-
Accepted Answer
-
Accepted Answer
T wrote:
Is this thread mainly a continuation of your original thread on this topic?
To be honest I forgot about that thread.
Peter Baldwin wrote:
Hi Marcel,
I haven't played around with Docker in quite some time and haven't tried Rocket yet. I was tempted to deploy a Docker-based backend for a new networking monitoring app that is coming to ClearOS, but Docker just felt a little too bleeding edge. I'll have to take another look soon!
Docker is really awesome or must I say containers are awesome! This is a real cool feature for ClearOS but you devs already agreed on that. I Haven't tried Rocket either I had read that Rocket is different from Docker. I'm not sure what the difference are. Google time I guess!!! Oh and I really like to hear your experience when you tried. -
Accepted Answer
Marcel van Leeuwen wrote:
That's a shame. Only two weeks after your last post on that thread you started this one, and yet that thread has great Google results placement already! I'll add a link to it so that some people find this follow-on thread.T wrote:
Is this thread mainly a continuation of your original thread on this topic?
To be honest I forgot about that thread. -
Accepted Answer
-
Accepted Answer
-
Accepted Answer
-
Accepted Answer
-
Accepted Answer
-
Accepted Answer
Hi Peter, Thanks for the reply!
I really like to see a faster development but I understand Clearcenter is limited on developers. Also there are of course priorities. So just thumbs up whats you guys are doing.
The Netify app sounds really interesting! I watch out for that app.
I sold My Synology boxes and I'm using a unRAID server for the time being. UnRAID is using Docker and kvm. It's working really well. I want to use ClearOS again and I'm investigation if I can use snapRAID for some redundancy on ClearOS. Also like I mentioned in this thread I experiment a bit with Docker on ClearOS. Not sure when i make the move back but maybe this summer vacation is a good timing. -
Accepted Answer
Out of interest on Clearos 6.x I have docker installed
[root@fs1 ~]# docker version
Client version: 1.7.1
Client API version: 1.19
Go version (client): go1.4.2
Git commit (client): 786b29d/1.7.1
OS/Arch (client): linux/amd64
Server version: 1.7.1
Server API version: 1.19
Go version (server): go1.4.2
Git commit (server): 786b29d/1.7.1
OS/Arch (server): linux/amd64
[root@fs1 ~]#
Not really using it for anything yet. Was more to play around with
[root@fs1 ~]# docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
cantino/huginn latest 6e2872acb625 2 weeks ago 876.8 MB
ubuntu latest 594b6e305389 7 weeks ago 122 MB
uifd/ui-for-docker latest f17d9cd5f5a1 11 weeks ago 7.391 MB
[root@fs1 ~]#
-
Accepted Answer
Paul wrote:
Out of interest on Clearos 6.x I have docker installed
[root@fs1 ~]# docker version
Client version: 1.7.1
Client API version: 1.19
Go version (client): go1.4.2
Git commit (client): 786b29d/1.7.1
OS/Arch (client): linux/amd64
Server version: 1.7.1
Server API version: 1.19
Go version (server): go1.4.2
Git commit (server): 786b29d/1.7.1
OS/Arch (server): linux/amd64
[root@fs1 ~]#
Not really using it for anything yet. Was more to play around with
[root@fs1 ~]# docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
cantino/huginn latest 6e2872acb625 2 weeks ago 876.8 MB
ubuntu latest 594b6e305389 7 weeks ago 122 MB
uifd/ui-for-docker latest f17d9cd5f5a1 11 weeks ago 7.391 MB
[root@fs1 ~]#
Thanks for sharing this with us Paul! So it's possible to install Docker on ClearOS 6.x. That is good news for the 6.x users. -
Accepted Answer
-
Accepted Answer
Marcel van Leeuwen wrote:
Do you have a good feeling to overcome these problems?
The de facto way to handle updates is to have the target application bundled with a base image (barebones OS). Every time there's an update required in the OS, the base image is updated and the new Docker application image is generated. That's all good, but that process would need to be automated and tested in a sane way. -
Accepted Answer
On unRAID Docker is working really well. The config files of the container app are outside of the container. So updating your container is really easy. I'm not sure where you referring to. Updating a docker container is just pull in the new Docker container but I think I don't understand you correctly. -
Accepted Answer
Hi Marcel,
Marcel van Leeuwen wrote:
On unRAID Docker is working really well. The config files of the container app are outside of the container. So updating your container is really easy. I'm not sure where you referring to. Updating a docker container is just pull in the new Docker container but I think I don't understand you correctly.
I was looking at Docker from the perspective of creating Docker containers for ClearOS, for example a ZoneMinder app. That will require quite a bit of development to make sure updated containers are created when security updates come along. I can see that security discipline is lacking with many docker images out there.
From the perspective of having Docker installed and available on ClearOS, that's fairly straightforward. Sorry for the confusion! -
Accepted Answer
Peter Baldwin wrote:
Hi Marcel,
Marcel van Leeuwen wrote:
On unRAID Docker is working really well. The config files of the container app are outside of the container. So updating your container is really easy. I'm not sure where you referring to. Updating a docker container is just pull in the new Docker container but I think I don't understand you correctly.
I was looking at Docker from the perspective of creating Docker containers for ClearOS, for example a ZoneMinder app. That will require quite a bit of development to make sure updated containers are created when security updates come along. I can see that security discipline is lacking with many docker images out there.
From the perspective of having Docker installed and available on ClearOS, that's fairly straightforward. Sorry for the confusion!
Hi Peter,
Interesting idea to create Docker containers for ClearOS specifically. I must say the idea also crossed my mind. Is it a idea collaborate regarding creating Docker containers? I like the idea of creating Docker containers for the ClearOS community. What do you think?
btw no need to apologise. -
Accepted Answer
Marcel van Leeuwen wrote:
Interesting idea to create Docker containers for ClearOS specifically. I must say the idea also crossed my mind. Is it a idea collaborate regarding creating Docker containers? I like the idea of creating Docker containers for the ClearOS community. What do you think?
I'm up for it! Did you have a particular app in mind? -
Accepted Answer
-
Accepted Answer
-
Accepted Answer
-
Accepted Answer
Would recommend we take a hard look at all of these before locking a default direction:
1) Kubernetes - https://kubernetes.io/
2) Google Container Engine - https://cloud.google.com/container-engine/
3) Docker - https://www.docker.com/
Feel free to add to the Tech Talk Agenda if needed.
Thank you all in advance! -
Accepted Answer
Michael Proper wrote:Would recommend we take a hard look at all of these before locking a default direction:
Well this thread is specifically about Docker which is why I think the majority of the focus is (rightly) on Docker here. Using a Container for a process has security advantages (as previously mentioned) but also it makes dependencies much cleaner. Rather than filling up your bare-metal installation with libraries only used by one or two processes, you can set up your bare-metal installation to only run the Containerisation system. Then each container can have the specific libraries it needs to run its process. This way you never have to try to resolve conflicts where Tool A requires Library v0.11 and Tool B requires Library v0.12 and you can't have both installed at the same time. Just put them in separate containers and they won't even know the other exists.
But if you're willing to consider other (superior) Containerisation technologies, you can't go wrong with systemd-nspawn. It's baked into systemd so is migratable between CentOS, Ubuntu, etc. etc. everything that uses systemd. If /var/lib/machines is ZFS or BTRFS it's trivial to make filesystem snapshots of container states, etc. It's much more mature than Docker and far less complex to set up and use. "Rocket" (or "rkt") is a small, recent tool for interfacing with it, but don't judge nspawn by Rocket: nspawn is the way forward for as long as systemd will reign. -
Accepted Answer
Michael Proper wrote:
Would recommend we take a hard look at all of these before locking a default direction:
1) Kubernetes - https://kubernetes.io/
2) Google Container Engine - https://cloud.google.com/container-engine/
3) Docker - https://www.docker.com/
Feel free to add to the Tech Talk Agenda if needed.
Thank you all in advance!
I'm only a bit familiar with Docker and LXC. I tested Proxmox for a while and Proxmox uses LXC for containerisation. unRAID uses Docker. I will checkout the sites you linked. -
Accepted Answer
-
Accepted Answer
Hey Nick,
Nick Howitt wrote:
I have not read up on it, but what are the advantages of running Plex or Transmission in Docker compared to natively (like now)?
Though not relevant with Plex or Transmission, a lot of LAMP-based apps have different MySQL/PHP/Python requirements, and we're seeing more "nginx vs Apache" conflicts as well. Containers solve that versioning/conflict problem. -
Accepted Answer
-
Accepted Answer
I've searched the Docker site and found some documentation on how to build a Docker container. Also found a how-to on Digital Ocean. Which how-to do you use?
Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here.
Register Here »