LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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-07-2021, 06:52 AM   #1
doskanoness
LQ Newbie
 
Registered: Oct 2021
Distribution: Arch Linux, Debian, OpenBSD
Posts: 14

Rep: Reputation: Disabled
Best distro for Linux containers


Hi, I'm looking for a light, stable, secure, reliable, and without systemd Linux distro for the containers. I'm going to run services like Nginx, PostgreSQL, ejabberd, ZNC inside the Linux containers. Is Alpine Linux a good choice?

Last edited by doskanoness; 10-07-2021 at 06:54 AM.
 
Old 10-07-2021, 07:08 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,925

Rep: Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320
[almost] Any distro is ok for running containers.
 
Old 10-08-2021, 02:55 PM   #3
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,671
Blog Entries: 4

Rep: Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945
I agree. First, select a distro that very conveniently supports all of the services that you need. Then, "introduce containers to provide isolation."

All processes that "run inside a container" are in fact always running directly on the host, "while wearing rose-colored glasses." You have plenty of good options regarding the exact way that you want to set it all up – lxc/lxd, DockerŪ, and so on.

Last edited by sundialsvcs; 10-08-2021 at 02:56 PM.
 
1 members found this post helpful.
Old 11-18-2021, 06:34 AM   #4
a2326
Member
 
Registered: Oct 2012
Distribution: Debian
Posts: 49

Rep: Reputation: Disabled
Quote:
All processes that "run inside a container" are in fact always running directly on the host
- Does that mean, that containers don't have an intermediate layers like virtual machines have and therefore don't waste any noteworthy additional resources?

Can you put all kinds of software (programming frameworks, libraries, applications...) into containers?

The basic idea of a container is not to emulate hardware, but to modularise software with all its dependencies and to separate operating system files from other subsequently installed files?
 
Old 11-18-2021, 06:53 AM   #5
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,925

Rep: Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320
Quote:
Originally Posted by a2326 View Post
- Does that mean, that containers don't have an intermediate layers like virtual machines have and therefore don't waste any noteworthy additional resources?
yes
Quote:
Originally Posted by a2326 View Post
Can you put all kinds of software (programming frameworks, libraries, applications...) into containers?
Not really, those containers are used to run apps in a separated/isolated environment, without "knowing" or accessing the other containers.
Quote:
Originally Posted by a2326 View Post
The basic idea of a container is not to emulate hardware, but to modularise software with all its dependencies and to separate operating system files from other subsequently installed files?
https://www.redhat.com/en/topics/containers
https://www.cio.com/article/2924995/...need-them.html
https://searchitoperations.techtarge...virtualization
 
1 members found this post helpful.
Old 11-18-2021, 03:59 PM   #6
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,671
Blog Entries: 4

Rep: Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945
Containers provide the necessary illusions, needed to provide isolation, at a minimum of cost. The processes are actually running directly on the host, but, as I said, they are "wearing rose-colored glasses." They think that they see the filesystem, the network topology, their own user-ids (including: "I am running as root!"), etcetera, but none of it is actually true. (And: they don't care, because they don't have to.)

It actually requires very little system resources to maintain these illusions – drastically less than what is required to deploy a "virtual machine."

This concept also creates many advantages for the hosts. An entire industry has sprung up (e.g. "Rackspace") around "container hosting." Since the containerized guest never sees anything (that is actually real ...) about its host, and since it costs virtually nothing either to create a new container or to destroy one, this scenario is both very flexible and very "scalable." As long as those rose glasses never come off, the host can be almost anything. The host(s) can react in real time to ever-changing load patterns with remarkable flexibility: the guests, being "none the wiser," do not have to care.

"You say that you need to spin-up a hundred new containers, right now?" Sure, no problem. As long as the host(s) actually has(have) the physical resources to run the new processes, the rest of it is just fiddling with internal OS data structures to create the required rose glasses. The host can pick whatever CPUs it pleases in order to do the job, and maybe even move the containers around!

Last edited by sundialsvcs; 11-18-2021 at 07:41 PM.
 
1 members found this post helpful.
Old 11-18-2021, 07:56 PM   #7
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,342
Blog Entries: 28

Rep: Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145
Without SystemD? Devuan or Slackware (once v. 15 is released, as v. 14.2 is getting a bit long in the tooth and I don't think --Current would be a good candidate for this usage case, but that's just one person's opinion).
 
Old 11-23-2021, 02:38 PM   #8
a2326
Member
 
Registered: Oct 2012
Distribution: Debian
Posts: 49

Rep: Reputation: Disabled
Does it make sense to outsource normal desktop applications into containers or would it be overkill? It wouldn't be a good idea to put an application into a container that you can easily download and install with aptitude but maybe it could be a good idea to put an application into a container that you have to install and configure manually, e.g. Eclipse IDE with a test server, libraries etc?
 
Old 11-23-2021, 08:08 PM   #9
YesItsMe
Member
 
Registered: Oct 2014
Posts: 915

Rep: Reputation: 313Reputation: 313Reputation: 313Reputation: 313
Containers are a security risk as their contents won't automatically get your system's security patches. Beware.
 
Old 11-24-2021, 07:10 PM   #10
doskanoness
LQ Newbie
 
Registered: Oct 2021
Distribution: Arch Linux, Debian, OpenBSD
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by sundialsvcs View Post
Containers provide the necessary illusions, needed to provide isolation, at a minimum of cost. The processes are actually running directly on the host, but, as I said, they are "wearing rose-colored glasses."
Does that mean containers don't offer an additional layer of security?
 
Old 11-24-2021, 09:55 PM   #11
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,674

Rep: Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712
Linix containers can consist of a service container or a distribution instance.
A distribution instance is an entire small distribution running almost as if a full virtual guest (but on the same kernel as the host. A distribution container can run one or more services, and even have some degree of separate networking from the host.
A service instance is just the executable and support files to run a single service, but with process separation from the host for additional security.
Either is better security than running the same services natively on the host.
 
Old 11-25-2021, 01:41 AM   #12
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,925

Rep: Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320
Quote:
Originally Posted by doskanoness View Post
Does that mean containers don't offer an additional layer of security?
the isolation itself implemented in containers means "a layer of security", but as it was mentioned several times security depends on the users/admins, so it will give additional possibilities to blunder something.
 
  


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: Everything You Need to Know about Linux Containers, Part II: Working with Linux Containers (LXC) LXer Syndicated Linux News 0 08-27-2018 01:53 PM
LXer: Containers running Containers LXer Syndicated Linux News 0 04-30-2017 04:30 PM

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

All times are GMT -5. The time now is 04:12 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