Install Ubuntu Server and Docker Snap vs. APT

 

My goal was to use Docker on a homebuilt NAS and later on a Mini-PC as a Container-Server. The operating system I used was the server version of Ubuntu, which is available in the form of an installation media on the official Ubuntu site: ubuntu.com/download/server. The current Ubuntu version is: 23.10 (found: 2023-10-17)

Try or Install Ubuntu Server

If the installation medium is inserted (DVD or USB stick), the GRUB bootloader will announce itself at the next start, see also: Starting the computer from USB or DVD | UEFI / BIOS - Boot.

The wizard guides us through the network settings and setting up the profile:

To be able to administer the server over the network, I enabled the OpenSSH server:

Docker can be easily enabled as a "featured server snap" during server installation.

I still installed Docker last according to the official instructions on the Docker site, since the paths of the installation are otherwise different from the default ("/var/lib/docker") are: "/var/snap/docker/common/var-lib-docker".

In addition, the snap version runs in an isolated mode, which prevents docker-compose files from being launched from any folder. When launching a container from a docker-compose file, it must be located in the home drive with the snap version, otherwise the file will not be found: Error: no configuration file provided: not found

user@server:/var/web/container$ docker-compose up
no configuration file provided: not found

See also:

 Launching Docker containers on Linux: use Docker Engine.

Tuning - mlocate

I use the Linux installation purely for running Docker containers. The many files in Nextcloud kept the server busy sometimes. The background: Ubuntu tries to create a file index of all local files for quick retrieval:

Those who do not use the operating system's search function can remove it via apt remove:

sudo apt remove locate mlocate

Ubuntu Snaps vs. Apt

Snap is a package management system from Canonical, the company that develops the Ubuntu Linux distribution. When using Snap, all required dependencies for an application are downloaded and installed in a tested container isolated from the system. In contrast, when using APT, packages are installed on the main file system.

Docker installation with Snap can be initiated in the terminal as follows:

sudo snap install docker

In comparison, software packages can be installed using the APT package manager as follows:

sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-compose

Docker installation also requires an additional package source, see: Launching Docker containers on Linux: use Docker Engine.

 

positive Bewertung({{pro_count}})
Rate Post:
{{percentage}} % positive
negative Bewertung({{con_count}})

THANK YOU for your review!

Updated: 2023-10-17 von Bernhard | Übersetzung Deutsch |🔔 | Comments:0

MySQL commands in Linux: connection, database, backup | Linux | Fan control Linux Debian: Fancontrol

Top articles in this section


Fan control Linux Debian: Fancontrol

After I installed a fan in my NAS, it always ran at top speed. In the BIOS I could set the speed, but the automatic mode did not work properly. Using the service fancontrol the speed of the fan can be linked to any sensor and any threshold and controlled automatically.


Linux folder used space - Bash TreeSize

To find out which folder needs how much space, the command “du” can be used on Debian. For an even better overview there is the commandline tool ncdu, which can analyze all folders similar to TreeSize.


Debian or Ubuntu kernel update or change- current kernel

The currently available Linux kernel has the version: 6.8.7 (found: 2024-04-17). Source: www.kernel.org. The Linux distributions, as an example Debian or Ubuntu used new kernel versions only with some delay, accordingly the used kernel versions are usually somewhat older. Which kernel is active on a Linux system can be read out with the following command:

Questions / Comments


By continuing to browse the site, you agree to our use of cookies. More Details