Should my Docker base image variants match my underlying host OS? - linux

For example, I have a server running Ubuntu 16.x that hosts a set of Docker containers that are running FROM node:x.x.x-stretch. The stretch variant is built off of Debian Jessie (the same version Ubuntu 16.x is built off of).
Is there any reason I shouldn't be using the latest Node image (node:x.x.x-buster), where -buster is built off of Debian 10?
From what I understand, this means that my node image would be more up-to-date / supported longer at the small cost of having less shared with the underlying host OS. Am I missing anything?

The main reason why people don't automatically update to the latest version, is due to package dependencies. It's difficult to keep track of what packages are dependent on what version of node, let alone what version of other packages.

Related

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

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

What is POSTGIS_VERSION 2.1.7+dfsg-3~94.git954a8d0.pgdg80+1?

I can understand 2.1.7 but what is +dfsg-3~94.git954a8d0.pgdg80+1 coming after that ?
I am now build postgis docker container from appropriate/docker-postgis
and am getting error
E: Version '2.1.7+dfsg-3~94.git954a8d0.pgdg80+1' for 'postgresql-9.3-postgis-2.1' was not found
E: Version '2.1.7+dfsg-3~94.git954a8d0.pgdg80+1' for 'postgis' was not found
seems to be a problem of package management?
How could I find fix this? How could I find all "subversions" +dfsg-3~94.git954a8d0.pgdg80+1.
thx
Sometimes using only version number 2.1.7 is not enough, as there are different OS, architectures (or even git branches as you can see), so developers append these specifics to the version to avoid confusion. If you used:
apt-get update postgresq-2.1.7
It would not make sense (or it would and would give you default option), because for this product version-number is not good enough for Docker to set up your environment.
dfsg = Debian Free Software Guidelines (specifies it is for specific version of Debian system, not for redHat for example)
git - version/branch specified
pgdg80 = PostgreSQL packages and backports for Debian/Ubuntu
Take a look here

removing older version of Ubuntu OS

I have installed ubuntu 10.x in my virtual box. From that i am upgrading the ubuntu machine to 12.04. Will the older versions[10.x] still remain in my machine or only the latest version will be available. If older versions available then how to clear my older versions of ubuntu? Please don't tell that install a new version of ubuntu. Because my data will be lost when i install a newer version of ubuntu.
Properly made upgrade process converts and replaces your old installation. That involves replacing libraries with never versions, updating sources list, converting and replacing configuration files etc. Some problems can appear, if you have not supported software installed (e.g. some PPA's can be not maintained for newer OS versions), but usually that is not a big issue.
All your private files and folders (your home folder) will survive this operation.
There are plenty of "how-tos" about upgrading Ubuntu to newer versions. Just take a look at how-do-i-upgrade-to-a-newer-version-of-ubuntu at AskUbuntu; after successfull upgrade you'll log into new version, no older version will remain on disk.
Of course, keep in mind that upgrading can take much more time than making a backup of your private files, doing clean install of new Ubuntu and getting your files back from backup.

Is it possible to build packages for multiple versions of Red hat Linux on a single server?

I have a set of programs for analyzing radiation data and I want to build packages for Red Hat Linux versions 4.x - 6.x. Is it possible to build these packages on a single build server running a single version of Red Hat Linux or do I need to build the version 4.x package on a server running version 4.x and the version 5.x package on a server running version 5.x?
If I can build packages for several versions on a single server, must that server be running the newest version or the oldest version of the OS?
You need to build toolchain for different OS environments (toolchain for Redhat 4.x and 5.x) and with in toolchain you can build packages for specific OS. toolchain is like a chroot environments.
You can create multiple Virtual machine using KVM and build many version of packages using single node..
You can use UML (User Mode Linux) which is quite interesting... Check out following Link
http://uml.devloop.org.uk/howto.html
You can build your packages in a chroot jail. You can use mach to do so.
Here's a tutorial on building packages with mach you could refer to, though it may be outdated.

Is EC2 Ubuntu 12.04 different, if compiling Haskell locally?

So I want to compile a Haskell program locally, and then upload it to my EC2 Ubuntu 12.04 (free trial) instance.
My question is, will it work on EC2 if I compile my haskell program on an official Ubuntu 12.04 distribution (say in virtualbox)?
Or do I need exactly the same version of Ubuntu as Amazon is running? Do it have to have the exact same set of updates etc..?
P.S. If yes - where do I get the Amazon's version of Ubuntu?
Thanks!
I do this on a regular basis, it should work just fine. Just make sure you're using the same architecture (32- or 64-bit).
You can get a list of the different Ubuntu AMIs at:
https://help.ubuntu.com/community/EC2StartersGuide
If you are using the official Ubuntu AMIs from https://cloud-images.ubuntu.com/releases/, you have the exact same binaries as the official Ubuntu distribution (as long as the architecture is the same: 32-bit or 64-bit). The only difference should be which packages are installed by default (so you might need to install a few extra packages). And as long as both are kept updated, both will also have the exact same set of updates.
Even if you are using AMIs created by someone else, it should still be the same; I believe most Ubuntu AMIs would be created by installing the official Ubuntu distribution.

Resources