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: 24.10 (found: 2024-10-10)

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!

Questions / Comments


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