18.08.2017

Linux Containers - Container LInux: Core OS - a minimal linux? A quick overview: diskspace, mounts, commands, kernel, ...

Virtualization techniques can be grouped into two categories
  1. os virtualization like VMware, Virtualbox, etc.
  2. container virtualization like Docker, etc.

Everybody is familiar with the first category. Creation of virtual machines is well known and most of us have created already tens or hundreds of such machines. (and deleted and lost them after some weeks). One of the benefits is, that it is easy to run additional machines on our laptops / workstations.
The second category is rarely used on laptops / workstations. This is something for computer rooms or data centers only.

Both categories reduce the amount of hardware needed - but management of all theses virtual entities has still to be done.

But for some workloads solutions are proposed like Kubernetes or Apache Mesos. Never heard about? ;-)

Kubernetes orchestrates containers and Core OS is providing a minimal Container Linux operating system, which can be used by Kubernetes.
Here my first expiriences with this minimal Linux system (for installation please refer to this posting):
$ uname -a
Linux localhost 4.11.9-coreos #1 SMP ......
Diskspace used is only 244 megabytes:

Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        361M     0  361M   0% /dev
tmpfs           499M     0  499M   0% /dev/shm
tmpfs           499M   13M  486M   3% /run
tmpfs           499M     0  499M   0% /sys/fs/cgroup
tmpfs           499M  8.0M  491M   2% /
/dev/loop0      244M  244M     0 100% /usr
tmpfs           499M     0  499M   0% /media
tmpfs           499M     0  499M   0% /tmp
tmpfs           100M     0  100M   0% /run/user/500
Filesystems:
...
tmpfs on / type tmpfs (rw,relatime,seclabel,mode=755)
/usr.squashfs (deleted) on /usr type squashfs (ro,relatime,seclabel)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
tmpfs on /media type tmpfs (rw,nosuid,nodev,noexec,relatime,seclabel)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,seclabel)
...

Available commands /bin (/bin is a softlink to /usr/bin):
core@localhost ~ $ ls /bin
'['                                 ip                 rview
actool                              ipcmk              rvim
arch                                ipcrm              scanelf
arping                              ipcs               scanmacho
attr                                iptables-xml       sclient
aulast                              isosize            scmp_sys_resolver
aulastlog                           join               scp
ausyscall                           journalctl         script
autopoint                           jq                 scriptreplay
auvirt                              js-config          sdiff
awk                                 k5srvutil          sechecker
base32                              kadmin             secon
base64                              kbxutil            sed
basename                            kdestroy           sediff
bash                                kernel-install     seinfo
bashbug                             keyctl             semodule_deps
block-until-url                     kill               semodule_expand
bootctl                             kinit              semodule_link
bsdcat                              klist              semodule_package
bsdcpio                             kmod               semodule_unpackage
bsdiff                              kpasswd            seq
bsdtar                              krb5-config        sesearch
bspatch                             ksba-config        setarch
bunzip2                             ksu                setfacl
busctl                              kswitch            setfattr
bzcat                               ktutil             setsid
bzcmp                               kvno               setterm
bzdiff                              last               sftp
bzegrep                             lastb              sg
bzfgrep                             lastlog            sh
bzgrep                              ldapadd            sha1sum
bzip2                               ldapcompare        sha224sum
bzip2recover                        ldapdelete         sha256sum
bzless                              ldapexop           sha384sum
bzmore                              ldapmodify         sha512sum
c_rehash                            ldapmodrdn         shlibsign
cal                                 ldappasswd         shred
captest                             ldapsearch         shuf
captoinfo                           ldapurl            sim_client
cat                                 ldapwhoami         slabtop
catchsegv                           ldbadd             sleep
cgpt                                ldbdel             sntp
chacl                               ldbedit            sort
chage                               ldbmodify          sotruss
chattr                              ldbrename          split
chcon                               ldbsearch          sprof
chfn                                ldd                sqlite3
chgrp                               lddtree            ssh
chkcon                              less               ssh-add
chmod                               lessecho           ssh-agent
chown                               lesskey            ssh-copy-id
chroot                              lesspipe           ssh-keygen
chrt                                libassuan-config   ssh-keyscan
chsh                                libgcrypt-config   sss_ssh_authorizedkeys
cksum                               liblinear-predict  sss_ssh_knownhostsproxy
clear                               liblinear-train    stat
cmp                                 link               stdbuf
col                                 linux32            strace
colcrt                              linux64            strace-log-merge
colrm                               ln                 stty
column                              locale             su
comm                                localectl          sudo
containerd                          localedef          sudoedit
containerd-shim                     locksmithctl       sudoreplay
coredumpctl                         logger             sum
coreos-cloudinit                    login              symcryptrun
coreos-install                      loginctl           symtree
coreos-metadata                     logname            sync
cp                                  look               systemctl
csplit                              ls                 systemd-analyze
ctr                                 lsattr             systemd-ask-password
curl                                lsblk              systemd-cat
curl-config                         lscpu              systemd-cgls
cut                                 lsipc              systemd-cgtop
date                                lslocks            systemd-delta
dbus-binding-tool                   lslogins           systemd-detect-virt
dbus-cleanup-sockets                lsmod              systemd-escape
dbus-daemon                         lsns               systemd-firstboot
dbus-launch                         lsof               systemd-hwdb
dbus-monitor                        lsscsi             systemd-inhibit
dbus-run-session                    lsusb              systemd-machine-id-setup
dbus-send                           lzcat              systemd-mount
dbus-test-tool                      lzcmp              systemd-notify
dbus-update-activation-environment  lzdiff             systemd-nspawn
dbus-uuidgen                        lzegrep            systemd-path
dd                                  lzfgrep            systemd-resolve
delv                                lzgrep             systemd-run
df                                  lzless             systemd-socket-activate
dgawk                               lzma               systemd-stdio-bridge
diff                                lzmadec            systemd-sysusers
diff3                               lzmainfo           systemd-tmpfiles
dig                                 lzmore             systemd-tty-ask-password-agent
dir                                 machinectl         systemd-umount
dircolors                           makedb             tabs
dirmngr                             mayday             tac
dirmngr-client                      mcookie            tail
dirname                             md5sum             tailf
dmesg                               mkdir              tar
dnsdomainname                       mkfifo             taskset
dnssec-dsfromkey                    mknod              tdbbackup
dnssec-importkey                    mkpasswd           tdbdump
dnssec-keyfromlabel                 mktemp             tdbrestore
dnssec-keygen                       modinfo            tdbtool
dnssec-revoke                       more               tee
dnssec-settime                      mount              test
dnssec-signzone                     mountpoint         tic
dnssec-verify                       mpicalc            tickadj
docker                              msgattrib          timedatectl
docker-containerd                   msgcat             timeout
docker-containerd-shim              msgcmp             tload
docker-proxy                        msgcomm            toe
docker-runc                         msgconv            toolbox
dockerd                             msgen              top
domainname                          msgexec            touch
du                                  msgfilter          tpmd
dumpelf                             msgfmt             tpmown
dumpsexp                            msggrep            tput
e2size                              msginit            tr
echo                                msgmerge           true
egrep                               msgunfmt           truncate
eject                               msguniq            tset
env                                 mv                 tsort
envsubst                            namei              tty
etcd2                               ncat               tzselect
etcdctl                             ncurses5-config    udevadm
ex                                  ncursesw5-config   ul
expand                              net                umount
expiry                              netcap             uname
expr                                netstat            uname26
factor                              networkctl         uncompress
faillog                             newgidmap          unexpand
fallocate                           newgrp             uniq
false                               newrole            unlink
fgrep                               newuidmap          unlzma
filecap                             ngettext           unshare
find                                nice               unxz
findcon                             nisdomainname      unzip
findmnt                             nl                 unzipsfx
fleet                               nohup              update-ssh-keys
fleetctl                            nproc              update_engine_client
fleetd                              npth-config        uptime
flock                               nsenter            usb-devices
fmt                                 nslookup           usbhid-dump
fold                                nspr-config        users
free                                nss-config         utmpdump
funzip                              nsupdate           uuclient
gapplication                        ntp-keygen         uuidgen
gawk                                ntpdc              vdir
gdbus                               ntpq               vi
gencat                              ntptime            view
getconf                             numfmt             vim
getent                              od                 vimdiff
getfacl                             oldfind            vmstat
getfattr                            openssl            w
getopt                              passwd             watch
gettext                             paste              watchgnupg
gettext.sh                          pathchk            wc
gettextize                          pcap-config        wdctl
gflags_completions.sh               pcprofiledump      wget
gio-querymodules                    pcre-config        whereis
git                                 pcregrep           which
git-cvsserver                       pcretest           who
git-receive-pack                    pg                 whoami
git-shell                           pgawk              whois
git-upload-archive                  pgrep              x86_64
git-upload-pack                     pidof              x86_64-cros-linux-gnu-curl-config
glib-compile-resources              pinentry           x86_64-cros-linux-gnu-gpg-error-config
glib-compile-schemas                pinentry-curses    x86_64-cros-linux-gnu-krb5-config
glib-genmarshal                     pinentry-tty       x86_64-cros-linux-gnu-libgcrypt-config
glib-gettextize                     ping               x86_64-cros-linux-gnu-nspr-config
gmsgfmt                             ping6              x86_64-cros-linux-gnu-nss-config
gobject-query                       pinky              x86_64-cros-linux-gnu-pcre-config
gpasswd                             pkaction           x86_64-cros-linux-gnu-xml2-config
gpg                                 pkcheck            xargs
gpg-agent                           pkexec             xenstore
gpg-connect-agent                   pkill              xgettext
gpg-error                           pkttyagent         xml2-config
gpg-error-config                    pldd               xmlcatalog
gpg2                                pmap               xmllint
gpgconf                             pr                 xmlwf
gpgparsemail                        printenv           xtrace
gpgscm                              printf             xz
gpgsm                               prlimit            xzcat
gpgtar                              protoc             xzcmp
gpgv                                ps                 xzdec
gpgv2                               pscap              xzdiff
grep                                pspax              xzegrep
gresource                           ptx                xzfgrep
groups                              pwd                xzgrep
gsettings                           pwdx               xzless
gss-client                          quota              xzmore
gtester                             quotasync          yes
gunzip                              randstat           ypdomainname
gzexe                               rbash              zcat
gzip                                readlink           zcmp
head                                realpath           zdiff
hexdump                             recode-sr-latin    zdump
hmac256                             rename             zegrep
host                                renice             zfgrep
hostid                              replcon            zforce
hostname                            reset              zgrep
hostnamectl                         rev                zic
i386                                rkt                zip
iconv                               rm                 zipcloak
id                                  rmdir              zipgrep
ifconfig                            rngtest            zipinfo
igawk                               rootdev            zipnote
indexcon                            route              zipsplit
infocmp                             rpcgen             zless
infotocap                           rsync              zmore
install                             runc               znew
ionice                              runcon

 Available commands /sbin (/sbin is a softlink to /usr/sbin):
core@localhost ~ $ ls /sbin/
adcli                getfilecon         modinfo                          sm-notify
addgnupghome         getpcaps           modprobe                         ss
addpart              getpidcon          mount.nfs                        sserver
agetty               getsebool          mount.nfs4                       sshd
applygnupgdefaults   getseuser          mpathpersist                     sss_cache
arp                  groupadd           multipath                        sss_debuglevel
auditctl             groupdel           multipathd                       sss_groupadd
augenrules           groupmems          nameif                           sss_groupdel
autrace              groupmod           newusers                         sss_groupmod
avcstat              grpck              nfsidmap                         sss_groupshow
badblocks            grpconv            nfsstat                          sss_override
blkdeactivate        grpunconv          nologin                          sss_seed
blkdiscard           gss-server         nscd                             sss_useradd
blkid                halt               nstat                            sss_userdel
blockdev             hwclock            ntpd                             sss_usermod
brctl                iconvconfig        ntpdate                          sssd
bridge               ifcfg              nvme                             start-statd
btrfs                ifstat             open_init_pty                    sulogin
btrfs-convert        init               osd_login                        swaplabel
btrfs-debug-tree     insmod             pam_tally                        swapoff
btrfs-find-root      ip6tables          pam_tally2                       swapon
btrfs-image          ip6tables-apply    pam_timestamp_check              switch_root
btrfs-map-logical    ip6tables-restore  parted                           sysctl
btrfs-select-super   ip6tables-save     partprobe                        tc
btrfs-show-super     ipmaddr            partx                            tcsd
btrfs-zero-log       ipset              pdata_tools                      telinit
btrfsck              iptables           pivot_root                       testsaslauthd
btrfstune            iptables-apply     plipconfig                       thin_check
cache_check          iptables-restore   pluginviewer                     thin_dump
cache_dump           iptables-save      policyvers                       thin_metadata_size
cache_metadata_size  iptunnel           poweroff                         thin_repair
cache_repair         iscsi-iname        pvchange                         thin_restore
cache_restore        iscsi_discovery    pvck                             thin_rmap
capsh                iscsiadm           pvcreate                         togglesebool
cfdisk               iscsid             pvdisplay                        tpm_hostpolicy
cgdisk               iscsistart         pvmove                           traceroute6
chcpu                kadmin.local       pvremove                         tune2fs
checkarray           kadmind            pvresize                         umount.nfs
chgpasswd            kdb5_util          pvs                              umount.nfs4
chpasswd             kdump              pvscan                           unix_chkpwd
compute_av           kexec              pwcheck                          unix_update
compute_create       key.dns_resolver   pwck                             update-ca-certificates
compute_member       kpartx             pwconv                           update_engine
compute_relabel      kprop              pwunconv                         update_engine_stub
compute_user         kpropd             quot                             useradd
consoletype          kproplog           quotacheck                       userdel
convertquota         krb5-send-pr       quotaoff                         usermod
coreos-postinst      krb5kdc            quotaon                          uuidd
coreos-setgoodroot   ldattach           quotastats                       uuserver
coreos-tmpfiles      ldconfig           rarp                             veritysetup
cryptsetup           lnstat             raw                              vgcfgbackup
ctrlaltdel           load_policy        readprofile                      vgcfgrestore
ctstat               logoutd            realm                            vgchange
debugfs              logrotate          reboot                           vgck
delpart              logsave            repquota                         vgconvert
depmod               losetup            request-key                      vgcreate
dhcpcd               lshw               resize2fs                        vgdisplay
dmeventd             lsmod              resizepart                       vgexport
dmsetup              lspci              restorecon                       vgextend
dmstats              lvchange           rmmod                            vgimport
dumpe2fs             lvconvert          rngd                             vgimportclone
e2freefrag           lvcreate           routef                           vgmerge
e2fsck               lvdisplay          routel                           vgmknodes
e2image              lvextend           rpc.idmapd                       vgreduce
e2label              lvm                rpc.mountd                       vgremove
e2undo               lvmchange          rpc.nfsd                         vgrename
e4defrag             lvmconf            rpc.rquotad                      vgs
ebtables             lvmconfig          rpc.statd                        vgscan
ebtables-restore     lvmdiskscan        rpcbind                          vgsplit
edquota              lvmdump            rpcdebug                         vigr
era_check            lvmetad            rpcinfo                          vipw
era_dump             lvmsadc            rtacct                           visudo
era_invalidate       lvmsar             rtcwake                          vmcore-dmesg
era_restore          lvreduce           rtmon                            warnquota
ethtool              lvremove           rtpr                             wipefs
exportfs             lvrename           rtstat                           xfs_admin
fdisk                lvresize           run_init                         xfs_bmap
filefrag             lvs                runlevel                         xfs_copy
findfs               lvscan             runuser                          xfs_db
fixparts             matchpathcon       saslauthd                        xfs_estimate
fsadm                mcstransd          sefcontext_compile               xfs_freeze
fsck                 mdadm              selinux_check_securetty_context  xfs_fsr
fsck.btrfs           mdassemble         selinuxexeccon                   xfs_growfs
fsck.cramfs          mdmon              semodule                         xfs_info
fsck.ext2            mii-tool           sestatus                         xfs_io
fsck.ext3            mke2fs             setcap                           xfs_logprint
fsck.ext4            mkfs               setenforce                       xfs_mdrestore
fsck.ext4dev         mkfs.bfs           setfilecon                       xfs_metadump
fsck.minix           mkfs.btrfs         setfiles                         xfs_mkfile
fsck.xfs             mkfs.cramfs        setpci                           xfs_ncheck
fsfreeze             mkfs.ext2          setquota                         xfs_quota
fstrim               mkfs.ext3          setsebool                        xfs_repair
gdisk                mkfs.ext4          sfdisk                           xfs_rtcp
genhomedircon        mkfs.ext4dev       sgdisk                           xqmstats
genl                 mkfs.minix         showmount                        xtables-multi
getcap               mkfs.xfs           shutdown                         zramctl
getconlist           mkhomedir_helper   sim_server
getdefaultcon        mklost+found       slattach
getenforce           mkswap             sln