Changes

Jump to navigation Jump to search
4,084 bytes added ,  00:08, 2 November 2023
draft
There are several reported issues on GitHub relating to '''docker-compose''' in Canasta due to changes in the command structure as compose has evolved from V1 to V2.
See [Canasta CLI now unusable on Ubuntu due to "docker compose" requirement?
https://github.com/CanastaWiki/Canasta-CLI/issues/87] as the latest issue (which refers to the prior issues).

== Version Info ==
On '''Ubuntu 22.04.3''' Jammy Jelly (the [https://wiki.ubuntu.com/Releases latest LTS of Ubuntu] at the time of this writing on November 01, 2023.)
<pre>
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.3 LTS
Release: 22.04
Codename: jammy
</pre>

'''Docker Compose is at v2.16.0''' in the standard repos (not including the official Docker repos). This version was released on 2023-02-08. The [latest available '''official''' version https://docs.docker.com/compose/release-notes/] is '''2.23.0'''
<pre>
docker compose version
Docker Compose version v2.16.0
</pre>

Although Docker Compose is supported on Ubuntu 20.04, Canasta is not. Canasta has a more stringent policy to run on 'recent' distributions since one of the main features of Canasta is to be able to run modern software with the greatest features.

The rest of the Docker system looks like this for an "out of the box" Ubuntu 22.04.03
<pre>
docker version
Client: Docker Engine - Community
Version: 23.0.1
API version: 1.42
Go version: go1.19.5
Git commit: a5ee5b1
Built: Thu Feb 9 19:47:01 2023
OS/Arch: linux/amd64
Context: default

Server: Docker Engine - Community
Engine:
Version: 23.0.1
API version: 1.42 (minimum version 1.12)
Go version: go1.19.5
Git commit: bc3805a
Built: Thu Feb 9 19:47:01 2023
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.18
GitCommit: 2456e983eb9e37e47538f59ea18f2043c9a73640
runc:
Version: 1.1.4
GitCommit: v1.1.4-0-g5fd4c4d
docker-init:
Version: 0.19.0
GitCommit: de40ad0
</pre>

== Properly Installing Docker Compose on Ubuntu 22.04 ==
You need to use the official repos and uninstall the distribution-provided (stale) software <ref>https://docs.docker.com/engine/install/ubuntu/#delete-old-versions</ref>

The unofficial packages to uninstall <ref>Images, containers, volumes, and networks stored in /var/lib/docker/ aren't automatically removed when you uninstall Docker. If you want to start with a clean installation, and prefer to clean up any existing data, read the [https://docs.docker.com/engine/install/ubuntu/#uninstall-docker-engine uninstall Docker Engine] section.</ref> are:

# docker.io
# docker-compose
# docker-compose-v2
# docker-doc
# podman-docker

Moreover, Docker Engine depends on containerd and runc. Docker Engine bundles these dependencies as one bundle: containerd.io. If you have installed the containerd or runc previously, uninstall them to avoid conflicts with the versions bundled with Docker Engine.

<syntaxhighlight lang="bash">
for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get remove $pkg; done
</syntaxhighlight>



<syntaxhighlight lang="bash">
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg

# Add the repository to Apt sources:
echo \
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
</syntaxhighlight>

<syntaxhighlight lang="bash">
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
</syntaxhighlight >

Navigation menu