LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Containers
User Name
Password
Linux - Containers This forum is for the discussion of all topics relating to Linux containers. Docker, LXC, LXD, runC, containerd, CoreOS, Kubernetes, Mesos, rkt, and all other Linux container platforms are welcome.

Notices


Reply
  Search this Thread
Old 10-03-2019, 01:02 AM   #1
IT-Jereon
LQ Newbie
 
Registered: Oct 2019
Posts: 18

Rep: Reputation: Disabled
Newbie trying to understand container images


Hi,

I am a newbie to Linux and a newbie to working with servers. I have been given two Dell PowerEdge R620 servers to play with, and I would like to set one up with Linux. This whole exercise is meant to learn a set of IT skills and get some experience under my belt when I want to start looking for jobs in 2 years’ time.

I have been advised to give containers a try as it is generating a lot of momentum.
Ideally I would like to setup a main server with a Container supported OS like Ubuntu Core or Container Linux, running multiple Linux Server Distro’s in their own container. Starting with the easy options, and work my way up.

I think I understand that I need some kind of a container (template)/image for the specific OS I want to run when creating the container, https://us.images.linuxcontainers.org. This I believe to be a list of non-official container images.

When I start googling for official containers or for containers not on the list, it gets all a bit confusing, as a lot of distros support containers, but don’t tell if they can be containerized. I also often end up at Docker, which is also a bit unclear, if this is a Docker package supported by the Linux Distro, or a Linux Distro that runs inside a Docker container.

My main questions are:
-Can any Linux Distro run inside a container?
- Are containers for Docker, Ubuntu, CentOS, Container Linux all interchangeable?
- Is there a list of official container images/(templates) of Linux server distros?
 
Old 10-03-2019, 01:30 AM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by IT-Jereon View Post
-Can any Linux Distro run inside a container?
I would say yes, but it has to be prepared for this. The images you find on https://us.images.linuxcontainers.org/ are examples for containerized distros running on the Linux Containers platform, also known as LXC and LXD.
Quote:
- Are containers for Docker, Ubuntu, CentOS, Container Linux all interchangeable?
Here your confusion shows.

Docker is a platform for running containers plus a huge container repository.
Centos and Ubuntu are operating systems, and Container Linux (formerly known as CoreOS) is an operating system that containerizes all services using Docker or another its own container technology rkt.

You are not comparing apples with oranges, but apples with broccoli and spaghetti.

Like Docker, LXC/LXD is a container platform, although they have different purposes. The purpose of a Docker container is to package an application so that it can run everywhere. A little bit like the Java promise in the 1990s. LXC/LXD is more focused on containerizing full operating systems. No,
Docker containers and LXC/LXD containers are not interchangeable.

The third Linux container platform I am aware of is OpenVZ, also available as a commercial product named Virtuozzo. Like LXC/LXD, its purpose is light-weight virtualization of entire operating systems. It's the pioneer in this technology but seems to be less known than the two others.
Quote:
- Is there a list of official container images/(templates) of Linux server distros?
I don't think there is anything like official container images. The list you found is for LXC/LXD, and Docker has its own list.

Last edited by berndbausch; 10-03-2019 at 01:36 AM.
 
3 members found this post helpful.
Old 10-06-2019, 05:36 PM   #3
IT-Jereon
LQ Newbie
 
Registered: Oct 2019
Posts: 18

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by berndbausch View Post
I would say yes, but it has to be prepared for this. The images you find on https://us.images.linuxcontainers.org/ are examples for containerized distros running on the Linux Containers platform, also known as LXC and LXD.
The LXC/LXD format is a "general" Linux Container Format? This is supported by a couple of Linux Distro's, but not by Container OS?

Quote:
Here your confusion shows.

Docker is a platform for running containers plus a huge container repository.
Centos and Ubuntu are operating systems, and Container Linux (formerly known as CoreOS) is an operating system that containerizes all services using Docker or another its own container technology rkt.
I understand that Centos, Ubuntu and Container Linux are operating systems, my confusion arise when googling for containers with these operating systems. The results are always pointing toward the container support by these and other operating systems and I can't find out if the specific OS can also be containerized.

Quote:
Like Docker, LXC/LXD is a container platform, although they have different purposes. The purpose of a Docker container is to package an application so that it can run everywhere. A little bit like the Java promise in the 1990s. LXC/LXD is more focused on containerizing full operating systems. No,
Docker containers and LXC/LXD containers are not interchangeable.
Is docker an Container OS by itself or does it need to run within an operating system? So for my purpose where I like to try different flavours of operating systems, docker would not be the best choice.

Quote:
I don't think there is anything like official container images. The list you found is for LXC/LXD, and Docker has its own list.
My intentions are to use a container supported OS (Linux) and run multiple Linux server OS inside containers. I think this will be easier to deal with when I screw things up or wanting to try something new instead of reinstalling the server.

The Dell server officially supported drivers are for Red Hat. Is using CentOS as my container OS going to increase my chances of driver support for non supported operating systems, or is it not going to matter?
 
Old 10-06-2019, 06:39 PM   #4
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by IT-Jereon View Post
The LXC/LXD format is a "general" Linux Container Format? This is supported by a couple of Linux Distro's, but not by Container OS?
I don't know what you mean by "general". The Container Linux web site says:
Quote:
The container engines Docker and rkt are configured out of the box, ready to run your applications.
Perhaps it's possible to configure LXC/LXD instead. You need to read their documentation to confirm this.
Quote:
I understand that Centos, Ubuntu and Container Linux are operating systems, my confusion arise when googling for containers with these operating systems. The results are always pointing toward the container support by these and other operating systems and I can't find out if the specific OS can also be containerized.
Any Linux distro can be containerized. If you want to containerize it yourself, however, you will have to invest some work.

Quote:
Is docker an Container OS by itself or does it need to run within an operating system?
Docker runs on an operating system.

Quote:
So for my purpose where I like to try different flavours of operating systems, docker would not be the best choice.
Any container framework needs to run on top of an OS. Keep in mind that containerized software shares the kernel and many other resources like the filesystem with the host system. This requires a host system in the first place. If your containerized OS is Linux-based, you need to run a Linux-based host system.

EDIT: I am wrong here; you can actually use a different kernel, for example see https://www.docker.com/blog/preview-...rs-on-windows/. I have not investigated how this is achieved.
Quote:
My intentions are to use a container supported OS (Linux) and run multiple Linux server OS inside containers.
You can use Docker or other container systems to try different flavours of OSs. You should be aware, however, that the look and feel of a containerized OS is not the same as a non-containerized OS.
Quote:
I think this will be easier to deal with when I screw things up or wanting to try something new instead of reinstalling the server.
My recommendation is to use a virtual machine or a live DVD instead. You will have the full operating system, not the containerized version. In the case of a VM, the separation of host OS and guest OS will be close to perfect, which is not the case with containers. And a live DVD can even be used on a system that has no software installed at all, even a diskless system. It's slower, though.
Quote:
The Dell server officially supported drivers are for Red Hat. Is using CentOS as my container OS going to increase my chances of driver support for non supported operating systems, or is it not going to matter?
Short answer: It matters a lot. The containerized OS uses the same kernel as the underlying CentOS. Therefore, it uses the same kernel drivers. EDIT: Same remark as the EDIT above.
 
Old 10-06-2019, 07:19 PM   #5
IT-Jereon
LQ Newbie
 
Registered: Oct 2019
Posts: 18

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by berndbausch View Post
I don't know what you mean by "general". The Container Linux web site says:
I probably don’t know either. I was thinking along the lines that a lot of Linux Operating Systems support LXC/LXD out of the box, and that it would need additional software to support Rocket or Docker.


Quote:
Any Linux distro can be containerized. If you want to containerize it yourself, however, you will have to invest some work.
Is that due to the difference between running an application inside a container or an Operating System?


Quote:
Any container framework needs to run on top of an OS. Keep in mind that containerized software shares the kernel and many other resources like the filesystem with the host system. This requires a host system in the first place.
Some container frameworks are integrated within the OS? Or am I missing something?

Quote:
EDIT: I am wrong here; you can actually use a different kernel, for example see https://www.docker.com/blog/preview-...rs-on-windows/. I have not investigated how this is achieved.
I came across this as well, but I’ll just stick to the same-same, as I find this complicated enough already.

Quote:
You can use Docker or other container systems to try different flavours of OSs. You should be aware, however, that the look and feel of a containerized OS is not the same as a non-containerized OS.
Is this limited by what the Host OS can support?

Quote:
My recommendation is to use a virtual machine or a live DVD instead. You will have the full operating system, not the containerized version. In the case of a VM, the separation of host OS and guest OS will be close to perfect, which is not the case with containers. And a live DVD can even be used on a system that has no software installed at all, even a diskless system. It's slower, though.
That would be a good and probably easier alternative. I thought that using containers was kind of a simpler answer to using Virtual Machines.
 
Old 10-06-2019, 08:16 PM   #6
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
The technology used to implement containers has been part of the Linux kernel for years (cgroups, namespaces, various filesystem types, ...), but implementing containerized applications using this technology is like writing a web application in assembler. You need additional software, LXC, Docker or other solutions to make this a realistic endeavour.

LXC/LXD doesn't come out of the box. You will have to install it. On Ubuntu it's fairly easy, since Canonical (the company behind Ubuntu) sponsors LXC/LXD. On RHEL-like systems, it is easy to install an old version of LXC; not easy to install anything recent or LXD (I am talking from experience with Centos 7.x, where x is a comparatively small number. Perhaps the situation is better for higher values of x, and for Centos 8).

Docker on the other hand is fairly easy to install. Docker (the company) has an obvious interest in making it simple.

A containerized OS is different from a non-containerized one in may ways. For example, anything that modifies the kernel is forbidden or at least limited, since it affects the container host. Also, run ps -ef in a container and admire a list of three or four processes compared to the tens or hundreds of processes on a normal OS. This is why I think that you should not use containers to evaluate whether an operating system is good for you.

In my opinion, it is considerably easier to use a virtual machine solution like Virtualbox or KVM and perform a full OS installation on it, rather than trying to get a meaningful OS up in a container. For one thing, a VM allows you to experience OS installation from an ISO file. A container doesn't. The only downside of VMs is that they consume a lot more resources than containers. On your PC, you may be able to run three VMs in parallel, but hundred containers. However, this should not be an obstacle for your use case.
 
2 members found this post helpful.
Old 10-06-2019, 08:55 PM   #7
IT-Jereon
LQ Newbie
 
Registered: Oct 2019
Posts: 18

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by berndbausch View Post
The technology used to implement containers has been part of the Linux kernel for years (cgroups, namespaces, various filesystem types, ...), but implementing containerized applications using this technology is like writing a web application in assembler. You need additional software, LXC, Docker or other solutions to make this a realistic endeavour.

LXC/LXD doesn't come out of the box. You will have to install it. On Ubuntu it's fairly easy, since Canonical (the company behind Ubuntu) sponsors LXC/LXD. On RHEL-like systems, it is easy to install an old version of LXC; not easy to install anything recent or LXD (I am talking from experience with Centos 7.x, where x is a comparatively small number. Perhaps the situation is better for higher values of x, and for Centos 8).

Docker on the other hand is fairly easy to install. Docker (the company) has an obvious interest in making it simple.

A containerized OS is different from a non-containerized one in may ways. For example, anything that modifies the kernel is forbidden or at least limited, since it affects the container host. Also, run ps -ef in a container and admire a list of three or four processes compared to the tens or hundreds of processes on a normal OS. This is why I think that you should not use containers to evaluate whether an operating system is good for you.

In my opinion, it is considerably easier to use a virtual machine solution like Virtualbox or KVM and perform a full OS installation on it, rather than trying to get a meaningful OS up in a container. For one thing, a VM allows you to experience OS installation from an ISO file. A container doesn't. The only downside of VMs is that they consume a lot more resources than containers. On your PC, you may be able to run three VMs in parallel, but hundred containers. However, this should not be an obstacle for your use case.
Sorry for the pointless quote here. I don't think this works; @berndbausch

Just wanna say thanks. It is slowly starting to make sense, and I am starting to understand the basic differences and limitations.
 
Old 12-04-2019, 05:41 AM   #8
dc.901
Senior Member
 
Registered: Aug 2018
Location: Atlanta, GA - USA
Distribution: CentOS/RHEL, openSuSE/SLES, Ubuntu
Posts: 1,005

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Quote:
Originally Posted by IT-Jereon View Post
Sorry for the pointless quote here. I don't think this works; @berndbausch

Just wanna say thanks. It is slowly starting to make sense, and I am starting to understand the basic differences and limitations.
Take a look at Rancher: https://rancher.com/
There is a free Intro to Kunernetes session tomorrow (December 5th) at 1PM Eastern time: https://rancher.com/training/
 
Old 12-28-2019, 09:09 PM   #9
vincix
Senior Member
 
Registered: Feb 2011
Distribution: Ubuntu, Centos
Posts: 1,240

Rep: Reputation: 103Reputation: 103
Quote:
Originally Posted by dc.901 View Post
Take a look at Rancher: https://rancher.com/
There is a free Intro to Kunernetes session tomorrow (December 5th) at 1PM Eastern time: https://rancher.com/training/
I would recommend against it. Rancher 1 has been a disaster (horrible upgrade process - random uncontrollable stuff; horrid iptables management that forces you to expose your system if you don't use a separate firewall - official dev suggesting filtering in the mangle table! (https://forums.rancher.com/t/how-to-...tables/249/6); to name just a few). Don't know why you'd trust Rancher 2 (with Kubernetes).

It's not a bad idea to have a layer of abstraction for a system as difficult as Kubernetes, but I'd first try to understand what's happening under the hood before becoming dependent on a platform that looks nice.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Docker lets security bug sniffer dogs off the leash at container images LXer Syndicated Linux News 0 05-11-2016 02:46 AM
linux container host os and container os question jzoudavy Linux - Newbie 1 09-01-2015 05:21 AM
LXer: GNOME's Matthew Garrett Says Ubuntu Container Images Are Breaking Copyright, Probably LXer Syndicated Linux News 0 07-22-2015 06:31 AM
LXer: Inside the Open Container Project: How Docker plans to unite the container market LXer Syndicated Linux News 0 06-23-2015 04:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Containers

All times are GMT -5. The time now is 03:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration