Can't add docker repository

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Juanmac
Level 2
Level 2
Posts: 54
Joined: Thu Feb 06, 2014 12:35 pm

Can't add docker repository

Post by Juanmac »

Hi, I'm trying to install docker in Mint Ulyssa and it fails when fetching the release file in the corresponding repository. Acording to docker docs:
echo \
"deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
and when

Code: Select all

sudo apt update
I get this error:

Code: Select all

Hit:1 http://mirrors.eze.sysarmy.com/ubuntu focal InRelease
Hit:2 http://mirrors.eze.sysarmy.com/ubuntu focal-updates InRelease            
Hit:3 http://mirrors.eze.sysarmy.com/ubuntu focal-backports InRelease          
Ign:4 https://mint.zero.com.ar/mintpackages ulyssa InRelease                   
Hit:5 https://mint.zero.com.ar/mintpackages ulyssa Release                     
Ign:6 https://download.docker.com/linux/ubuntu ulyssa InRelease                
Hit:7 http://archive.canonical.com/ubuntu focal InRelease                      
Hit:8 http://security.ubuntu.com/ubuntu focal-security InRelease               
Err:10 https://download.docker.com/linux/ubuntu ulyssa Release                 
  404  Not Found [IP: 2600:9000:21f4:cc00:3:db06:4200:93a1 443]
Err:11 https://packages.microsoft.com/repos/ms-teams stable InRelease        
  500  Internal Server Error [IP: 13.90.56.68 443]
Reading package lists... Done
E: The repository 'https://download.docker.com/linux/ubuntu ulyssa Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
Tryied adding directly some other repos like

Code: Select all

 deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable
to

Code: Select all

/etc/apt/sources.list
but didn't work either.
I'm using ZSH shell, just to say.
Thank you all!
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
Larry78723
Level 14
Level 14
Posts: 5476
Joined: Wed Jan 09, 2019 7:01 pm
Location: Jasper County, SC, USA

Re: Can't add docker repository

Post by Larry78723 »

Why not install Docker thru Synaptic Package Manager?
Image
If you have found the solution to your initial post, please open your original post, click on the pencil, and add (Solved) to the Subject, it helps other users looking for help, and keeps the forum clean.
Juanmac
Level 2
Level 2
Posts: 54
Joined: Thu Feb 06, 2014 12:35 pm

Re: Can't add docker repository

Post by Juanmac »

Larry78723 wrote: Thu May 06, 2021 10:24 am Why not install Docker thru Synaptic Package Manager?
Don't know. I was only following the official documentation. Is there any difference?
User avatar
spamegg
Level 14
Level 14
Posts: 5105
Joined: Mon Oct 28, 2019 2:34 am
Contact:

Re: Can't add docker repository

Post by spamegg »

Looks like many others are having the same issue. I saw this reported by at least 3 people. So we can conclude Docker's documentation is crap/outdated or their servers are down or both.

You can:

Code: Select all

sudo apt install docker
wbravin
Level 1
Level 1
Posts: 26
Joined: Thu May 20, 2021 10:22 am

Re: Can't add docker repository

Post by wbravin »

hello all I am a novice to Linux mint. this would be my first install.

I was always using window since 1985 and now i am fed up with Microsoft.

My reason to move to mint is to ultimately install on a dedicated pc. home assistant supervisor for this i need to install docker.

I followed the instruction as posted on the linux mint community. However when i get to insert the following command
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(. /etc/os-release; echo "$UBUNTU_ulyana") stable"
i get an error telling me that /etc/os-release directory does not exist

If in the terminal I do a cd /etc and the ls I see the directory os-release present however with a different colour. If i try to access it with a cd it tells me that the directory does not exist.

What am i doing wrong and what am i missing

i am by no means a programmer and i must confess that even the sudo...... is confusing to me

Thank you all in advance for your response
dave0808
Level 5
Level 5
Posts: 987
Joined: Sat May 16, 2015 1:02 pm

Re: Can't add docker repository

Post by dave0808 »

The sudo command is supposed to add docker's Ubuntu repository to your settings so that you can pull the packages from them direct, rather than installing the default one, which will not be updated as regularly. However, the command (as you've entered it) would appear to be broken.

The section $(. /etc/os-release; echo "$UBUNTU_ulyana") is supposed to do 2 things:-

First "source" the contents of /etc/os-release, which means that it effectively takes the contents of that file and executes each line as a command. If you look at the file with cat /etc/os-release you'll see that it is setting some values to variable names. The reason the file is shown in a different colour is that it is actually a link to another file. To see the details of the actual file, use ls -lL os-release.

The second part of that section is to echo (write / output) a string where the first part is defined by a variable called "UBUNTU" and add "_ulyana" to that.

However, there is no variable UBUNTU, neither by default nor set within the os-release file. Hence why it didn't work.

Assuming that you're running Linux Mint 20 or 20.1, then the base Ubuntu version is 'focal', and that's is what the command is supposed to be doing. Rather than $UBUNTU, it should be using $UBUNTU_CODENAME. Or simply replace the lot with 'focal'...

Code: Select all

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(. /etc/os-release; echo "$UBUNTU_CODENAME") stable"
# or
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
However, this won't add the 'signed-by' option that Docker recommend as per their installation instructions.
User avatar
spamegg
Level 14
Level 14
Posts: 5105
Joined: Mon Oct 28, 2019 2:34 am
Contact:

Re: Can't add docker repository

Post by spamegg »

wbravin wrote: Thu May 20, 2021 10:53 am What am i doing wrong and what am i missing
Nothing, Docker's documentation/instructions are wrong. Just do sudo apt install docker
wbravin
Level 1
Level 1
Posts: 26
Joined: Thu May 20, 2021 10:22 am

Re: Can't add docker repository

Post by wbravin »

Hi Folks

Thank you for taking the time from your busy day to formulate your response.

as i mentioned i do not understand all the commands to be used in the shell and when or how to use them . I'm learning (very slowly) as i go along. BTW i also forget quickly. :oops:

BTAIM. Under managed apps the is a docker application available. however several videos mention not to use it.

Is the sudo apt install docker just installing the docker from the mint repository therefor does my comment above still stand?

At the moment I foubared my SSD and i need to get someone to fix it (this will be done Tuesday). At that time i will pursue this once again

THank you
dave0808
Level 5
Level 5
Posts: 987
Joined: Sat May 16, 2015 1:02 pm

Re: Can't add docker repository

Post by dave0808 »

It used to be that the version of docker in the standard Mint/Ubuntu repo was massively out of date, and docker development is/was very fast moving. So you could end up with issues that you could not get advice for because the engine you were using was out of date.

However, that appears to be no longer the case (it was news to me at least, as I'd just been using Docker's repo for a long time now).

I can see that the Ubuntu repo contains v20.10.2 of docker.io, and the Docker repo contains v20.10.6 of the "equivalent" docker-ce package. So the Ubuntu package is a little behind and it would be up to each individual to decide if this is an issue for them. This blog entry contains more information to help people make their own decision.
User avatar
spamegg
Level 14
Level 14
Posts: 5105
Joined: Mon Oct 28, 2019 2:34 am
Contact:

Re: Can't add docker repository

Post by spamegg »

Repo version is perfectly fine, I use it for development regularly no problem.
blockchain
Level 1
Level 1
Posts: 1
Joined: Sun May 23, 2021 12:55 am

Re: Can't add docker repository

Post by blockchain »

wbravin wrote: Thu May 20, 2021 10:53 am I followed the instruction as posted on the linux mint community. However when i get to insert the following command
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(. /etc/os-release; echo "$UBUNTU_ulyana") stable"
i get an error telling me that /etc/os-release directory does not exist
/etc/os-release is not a directory it's a file that contains the os name and version in Linux. Type the following command to see your Linux version and os name
cat /etc/os-release

APT does not use HTTPS and it is crucial to install the packages and dependencies that will enable it to use a repository through https.
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg
And check if you're using x86_64/amd64. You can do that by:
uname -m
If your using x86_64/amd64:
echo \
"deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release; echo "$UBUNTU_CODENAME") stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

If you haven't added the Docker’s official GPG key, Remove the signed-by. It's better if you add Docker's GPG.
Then update apt, and install docker engine.
wbravin
Level 1
Level 1
Posts: 26
Joined: Thu May 20, 2021 10:22 am

Re: Can't add docker repository

Post by wbravin »

Hello all

Thank you so much for your guidance.

As mentioned in my original post (or maybe my second) i will get my pc back on Wednesday at which point i will start to rebuild it with mint 20.1.

I will try your recommendations at that time.

During the past few days i developed additional questions if I may.

In reading various posts, I see that they talk about minty as a server. Is there a specific version that i need to download?

As mentioned in my original post I would like to make this laptop a dedicated Home Assistant server on which i will ultimately install an AEOTEC Z-wave USB to control my devices. I currently have Vera Plus controller and I'm relatively happy with it. This project is to keep me busy and to learn new things

As such (and because of my fumbling I need to have specific, and pragmatic guidance on what to install
Which version of mint |(is there a server version or is it by nature a server configuration? do i need to do anything different?
which version of Docker
Which version of Home assistant (probably Home Assistant supervisor or OS)

I see that in some post it is said that the docker documentation is not correct and/or clear. I agree fully.

May i suggest that the process and procedure for the installation of docker on mint to be controlled by the mint community. This would serve as gospel for any new and incompetent users like myself

I will try to document this install to the end for my benefit and if you feel that this adds value, I could publish it in the community (there probably already one I did not find it) I would suggest that this could be a separate submenu to your community page

Regardless thank you so much for taking time off during your weekend (which is probably the first weekend of relative freedom during this pandemic) to assist me in my journey
wbravin
Level 1
Level 1
Posts: 26
Joined: Thu May 20, 2021 10:22 am

Re: Can't add docker repository

Post by wbravin »

Hello all

Update.

I received my laptop today and i have installed linux mint 20.1 (in my opinion successfully) hooray.

i typed uname -m and it returned dx86_64 not amd64

Based upon this thread,
I tried to install docker.io from the software manager for fun and to learn something more. it installed

typing docker container ls

i get a permission denied while trying to connect to the docker daemon socket at unis:///var/run/docker.sock: Get http://%2fvar%2Frun%2docker.soc/v1.24/containers/jason: dial unix/var/run/docker.sock

needles to say that i uninstalled docker.io from the software manager

Thank you for taking the time to respond
User avatar
spamegg
Level 14
Level 14
Posts: 5105
Joined: Mon Oct 28, 2019 2:34 am
Contact:

Re: Can't add docker repository

Post by spamegg »

Just do

Code: Select all

sudo apt install docker
The Docker daemon requires a reboot to begin working I think.
wbravin
Level 1
Level 1
Posts: 26
Joined: Thu May 20, 2021 10:22 am

Re: Can't add docker repository

Post by wbravin »

thank you for your prompt reply

i did reboot the pc to no avail. If you mean reboot docker daemon ...

i did a service docker restart to no avail same error

i also tried groupadd -a"wbravin" -G"docker" docker I get that docker as a group already exist already exist

i still get permission denied

Thanks mate
User avatar
spamegg
Level 14
Level 14
Posts: 5105
Joined: Mon Oct 28, 2019 2:34 am
Contact:

Re: Can't add docker repository

Post by spamegg »

Try

Code: Select all

sudo usermod -a -G docker wbravin
wbravin
Level 1
Level 1
Posts: 26
Joined: Thu May 20, 2021 10:22 am

Re: Can't add docker repository

Post by wbravin »

thanks

tried

i get the option menu then reading the option menu i tried sudo usermod -l wbravin and this got me to the prompt (with no activity)

I tried again to no avail then i tried sudo docker container ls and i finally got CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES

therefor am i right to assume that it is now working ? if so great now i could install home assistant on this machine (i still need to figure this one out)

great thank you
wbravin
Level 1
Level 1
Posts: 26
Joined: Thu May 20, 2021 10:22 am

Re: Can't add docker repository

Post by wbravin »

Hello all

Sorry to keep posting my ignorance

As far as i can see, Docker is installed and I sorted the permission issues by doing:
sudo groupadd docker
sudo usermod -aG docker ${USER}
su -s ${USER}
docker run hello-world

and it worked

then i followed the steps to install home assistant
docker run -d \
--name="hass" \
--restart on-failure \
-v /home/wbravin/hass_config:/config \
-e "TZ=Europe/Rome" \
-p 8123:8123 \
homeassistant/home-assistant

and it installed yuppie

My laptop has an IP address of 192.168.1.9
however if i go to chrome and type http://192.168.1.9:8123 i get a refused connection

What am i missing?

i trolled the net to no avail
wbravin
Level 1
Level 1
Posts: 26
Joined: Thu May 20, 2021 10:22 am

Re: Can't add docker repository

Post by wbravin »

hello all


sorry for this i figured it out.

I had to access the mint pc from an other pc (in this case Win10) and 192.168.1.0:8123 worked.

the only issue is that i installed the incorrect version of home assistant. I installed home assistant core as opposed to home assistant os

Many thanks to you all for saving my bacon and for putting up with this old fart

Be well
Locked

Return to “Beginner Questions”