Flatpak / Appimage / Docker
From the point of view of a software developer, it is easiest to write code and distribute the source and allow end-users to install from source. Unfortunately, this is not going to make the software very convenient, because a lot of end-users aren't going to install from source. However, it is also a pain to create and maintain .deb
packages, .rpm
packages, .pkg
Ā packages, and .tar.gz
files. There have been attempts to create Linux Distro Agnostic packages with the intent to simplify the distribution of software. This has been somewhat controversial for a few reasons.
Flatpak
Flatpak is a new way of distributing packages. You have to install Flatpak on your system, then you can add access to FlatHub which is the most popular repo for Flatpak applications.
[root@localhost ~]$ apt install flatpak [root@localhost ~]$ flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
It's recommended after installing flatpak to reboot.
Then you can start installing applications like Helix (a self-described 'post-modern text-editor'
[bradr@localhost ~]$ flatpak install helix
One of the benefits, is that after Flatpak is installed, unprivileged users can use flatpak to install applications.
Appimage
Appimage is even simpler than Flatpak. You can download a .appimage
Ā file, make it executable and run it.
For instance, let's install Krita, one of the most beloved digital painting programs.
[bradr@localhost ~]$ wget https://download.kde.org/stable/krita/5.1.5/krita-5.1.5-x86_64.appimage [bradr@localhost ~]$ chmod +x krita-5.1.5-x86_64 [bradr@localhost ~]$ ./krita-5.1.5-x86_64
That's it.
Docker
Docker is more than a software distribution format. Docker works in a somewhat similar way to a VM, but runs within the host OS. With docker, you can create "containers" with distribution and environment variables set to be static and independent from the OS at large. This has a lot of benefits for development, because it can make code more portable, it can set up different environments within the same server or cluster etc. One of the uses then, if your development is done with Docker, is to just distribute your software as a container running within Docker.
Getting started with Docker is pretty simple. Just install it with your package manager. Then start it with systemctl
[root@localhost ~]# apt install docker [root@localhost ~]# systemctl start docker [root@localhost ~]# systemctl enable docker
Now you are ready to use it. You can access docker images through dockerhub or other locations. Also, some github repos will distribute docker images through download.
For example, let's install DoChat, a docker that gives you a desktop WeChat client.
[bradr@localhost ~]$ curl -sL https://raw.githubusercontent.com/huan/docker-wechat/master/dochat.sh | sudo bash [sudo] password for bradr:
We will get into some more interesting Docker use cases a little later