JureW
JureW

Reputation: 683

Ubuntu 23.10 + Docker

I've updated my Ubuntu to 23.10, and than I started to have several issues with docker. I did a full uninstall, and now I can't install it again. When I run sudo apt install docker-ce docker-ce-cli containerd.io I get error like

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package docker-ce-cli is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  docker-buildx-plugin

E: Unable to locate package docker-ce
E: Package 'docker-ce-cli' has no installation candidate
E: Unable to locate package containerd.io
E: Couldn't find any package by glob 'containerd.io'

I checked the official Docker page (to late, of course..) and saw this: To install Docker Engine, you need the 64-bit version of one of these Ubuntu versions:

So now I have an issue. Anyone has any idea on what to do? I've installed docker via snap, but than I get issue like permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: when running docker-compose up --build.

I also tried to install Docker desktop, no luck and I get an error stating "Unable to install docker-dfesktop: The following packages have unmet dependencies:"...And there are no packages listed.

Anyone had simmilar issue, knows how to tackle this?

Upvotes: 2

Views: 7550

Answers (5)

Soteris 92
Soteris 92

Reputation: 121

Docker PPA is not ready for 23.10 yet. You can install using lunar only TEMPORARY for make your work and later when is officially update from docker you must change your repo

# 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 \
  "lunar" stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update

Upvotes: 6

audiodude
audiodude

Reputation: 2810

Try apt install docker.io

From the official 23.10 release notes:

Docker:

The docker.io package has been updated to version 24.0.5, which includes changes that can be seen in the upstream release notes 16. There are also two new Docker CLI plugins available in the Ubuntu archive:

docker-buildx version 0.11.2.

docker-compose-v2 version 2.20.2.

Upvotes: 4

Tommy Maffia
Tommy Maffia

Reputation: 11

I've updated to 23.10 already as well and i'm in a similar position. Docker hasn't updated their official repos to support 23.10 yet. You might be able to use their repo for 23.04, but the likelihood of everything correctly working is slim... There is a snap for docker, you might be stuck with that for a few days / weeks until Docker officially supports the latest Ubuntu

I also had the issue with permissions you are referencing. You have two options:

  1. use sudo all the time

  2. add your user to docker group as the snap docs suggest, then:

    sudo chmod 666 /var/run/docker.sock

Upvotes: 1

Docker PPA is not ready for 23.10 yet. I see only one package (containerd.io_1.6.24-1_amd64.deb) there. We need to ask docker's persons for this.

Upvotes: 2

Jordan Humphries
Jordan Humphries

Reputation: 48

So now I have an issue. Anyone has any idea on what to do? I've installed docker via snap, but than I get issue like permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: when running docker-compose up --build.

TL;DR

sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker

I've had this issue a couple of times with new installs, I usually just end up searching for the problem in google and come up with the same digital ocean post.

https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket

From what I understand it is because docker wants access to the sock that is owned by root. So you will get this error if you fail to prefixing docker with "sudo" each time you need run. If you create a docker group, when docker starts it will then create a sock accessible to those within that group.

For high security and production environment, probably have a read of the official docker post:

https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user

Not sure if this is going to work for you but give it a go.

Upvotes: 1

Related Questions