Are there any limitations regarding the age of a linux distribution which can be used to create a docker base-image? - linux

Im wondering if its possible to use very old Linux Distribution like Debian GNU/Linux 3.1 (Sarge) and create a base-image of it to run legacy code not working under "younger" distros.
Only Thing i found about it was somebody successfully using Ubuntu Feisty: Run old Linux release in a Docker container?
Are there any known limitations?

Your host needs to have a minimal version of the Linux kernel, and that version is 3.10
See
Docker minimum kernel version 3.8.13 or 3.10
extract from the previous link
There's also a shell-script to check if your system has the required dependencies in place and to check which features are available;
https://github.com/docker/docker/blob/master/contrib/check-config.sh
So you can use this to check if you will be able to use docker on this host.
From
https://wiki.debian.org/DebianSarge?action=show&redirect=Sarge
I see
kernel : linux 2.4.27 and 2.6.8
So it may not work

Related

Can I change the Linux kernel that Docker uses on macOS?

Q1: Can I change which Linux kernel that Docker uses on macOS?
Q2: When does Docker upgrade the Linux kernel version?
Currently, as of:
21 Sep 2020, up-to-date Docker Desktop v2.3.0.5 (48029), Engine 19.03.12
it is using Linux kernel 4.19.76 (released 22 Oct 2018).
I expected it to be on a more recent kernel
(e.g., Linux 5.8 was released 2 Aug 2020; Linux 5.0 was release 3 Mar 2019).
$ docker run -it alpine uname -a
Linux f745312f5a3e 4.19.76-linuxkit #1 SMP Tue May 26 11:42:35 UTC 2020 x86_64 Linux
Related:
How does Docker run a Linux kernel under macOS host?
Can I change the kernel used in Docker for Windows?
https://kernelnewbies.org/LinuxVersions
Q1: Can I change which Linux kernel that Docker uses on macOS?
Safe and simple answer: No. Unless you want to mess-up directly with the Hyperkit VM that docker desktop for Mac is deploying for you when installing. I don't use Mac, I have no clue it this is even possible and strongly suggest you don't walk that path unless you seriously know what your are doing and are ready to reinstall everything if this breaks.
Q2: When does Docker upgrade the Linux kernel version?
When that change is incorporated to a new release and announced on the Docker for mac release notes. Latest kernel upgrade was made on 2020-05-27.
That being said, docker only uses the underlying kernel of the OS/VM where it is installed. If you really need a different kernel for a very specific reason, you can always deploy in parallel your own custom vm with the exact kernel you want, install a docker engine there and use it.
https://stackoverflow.com/a/65844573/8818399
Docker uses its own patched Kernel (along with a specialized Linux distro) called linuxkit in Docker Desktop. It is mentioned in https://hub.docker.com/r/docker/for-desktop-kernel.
I am able to find kernel, initrd.img and cmdline in a folder called linuxkit inside the application folder of my Docker for Mac installation.
Simply build your own Kernel with the instructions/patches of linuxkit and replace those files.

Oracle on lxc in ubuntu

I'm currently trying to install an oracle server (11g) in a linux container on ubuntu (following this tutorial (http://www2.hawaii.edu/~lipyeow/ics321/2014fall/installoracle11g.html).
When I try to change the file handler with sysctl, the modifications doesn't save into my container. Moreover, when I make the modification in the main ubuntu kernel, it propagates to the containers, so my question is as follow:
How can I modify the file handlers only in my oracle container ?
Thanks.
Try out the Orabuntu-LXC project code. It supports Ubuntu 16.04, 17.04, 17.10 and is purpose-built for running Any Oracle on Any Linux, including Ubuntu Linux. Note that as you probably already know, Oracle Corp does not formally support or certify Oracle on Ubuntu Linux.
As far as you question about the file handlers, some sysctl values can only be set at the LXC host level, and some can be set in the container.
https://sites.google.com/site/nandydandyoracle/oracle-rac-in-lxc-linux-containers/oracle-lxc-vlc#TOC-Install-the-etc-sysctl.conf-File-Required-for-Oracle
https://github.com/gstanden/orabuntu-lxc
https://sites.google.com/site/nandydandyoracle/
Please note that the step-by-step guides are quite old and that the basic LXC infrastructure together with OpenvSwitch, an LXC-containerized DNS/DHCP, and an optional SCST Linux SAN can all be installed on Ubuntu 16.04, 17.04 and 17.10 with one command:
./anylinux-services.sh
after completion of which all you would need do is download your Oracle database installtion media and install.

How to update/check the ubuntu kernel configuration?

I am new to Linux, and currently I want to try Kubernetes in my laptop. The official tutorial says
You need to have docker installed on one machine.
Your kernel should support memory and swap accounting. Ensure that the following configs are turned on in your linux kernel:
CONFIG_RESOURCE_COUNTERS=y
CONFIG_MEMCG=y
CONFIG_MEMCG_SWAP=y
CONFIG_MEMCG_SWAP_ENABLED=y
CONFIG_MEMCG_KMEM=y
I just installed Ubuntu 14.04, and I dont know whether the above configs are already turned on or not, how to check them? and if some are still off, how to turn them on?

Installing another version of linux on my system

I need to build locally a driver for "precise" Ubuntu edition (uname -r for that system returns 3.2.0-33-generic-pae).
My local host is Ubuntu 13.10 'sausy'.
But I fail to install the linux headers( what should I do to set up the environment I need?)
I downloaded the image from here: from packages.ubuntu but what my next steps should be?
Actually I don't need exact steps but pointing the right direction would be great!
Thanks in advance :)
If you want to just build the driver (with out installing/testing)
then you will just have to download the kernel source of the preferred version (in this case it is 3.2.0-33) from kernel.org, build it with config from your host PC, and then compile your driver/module against that.
If you plan to install/test then after building the kernel source of the preferred version,
install the same to your host PC, then you will be able to insmod the driver you built

Install 2.4.33 kernel in Debian Wheezy

I need to install old kernel into Kali (Debian like) distro. I need to run program which requires older kernel.
I downloaded kernel but the installation gives me too many errors. I was reading similar topics and watch the videos, but so far I am not successful.
I do not have experience with kernels. Is there .deb package for kernels or any other easier way to do it?
Can I use such old kernel for this distribution?
Thank you
The 2.4.33 kernel is pretty old. According to Debian's packaging files installing that old a kernel doesn't seem to be doable in wheezy. Attempting to install and run an old kernel outside the packaging system is not going to to work. All the "modern" libraries and applications will be broken when running the 2.4 kernel, as will the program (you need more than just a kernel for your program). If it were me, I'd set up a virtualization environment like VirtualBox or something similar and pick an old distro like CentOS 3.9 or an older Debian release (sarge or later). If that's not an option, you could always try and port the program to a more recent kernel.

Resources