apt-get update "Temporary failure resolving 'deb.debian.org"

natepichler

Dabbler
Joined
Feb 14, 2022
Messages
11
I installed nginx in a docker and need to also install nano.

Code:
docker run --name nginx --restart always --ip 192.168.0.95 nginx


When I run apt-get update in the container, I get the following error:

Code:
Err:1 http://security.debian.org/debian-security bullseye-security InRelease
  Temporary failure resolving 'security.debian.org'
Err:2 http://deb.debian.org/debian bullseye InRelease
  Temporary failure resolving 'deb.debian.org'
Err:3 http://deb.debian.org/debian bullseye-updates InRelease
  Temporary failure resolving 'deb.debian.org'
Reading package lists... Done
W: Failed to fetch http://deb.debian.org/debian/dists/bullseye/InRelease  Temporary failure resolving 'deb.debian.org'
W: Failed to fetch http://security.debian.org/debian-security/dists/bullseye-security/InRelease  Temporary failure resolving 'security.debian.org'
W: Failed to fetch http://deb.debian.org/debian/dists/bullseye-updates/InRelease  Temporary failure resolving 'deb.debian.org'
W: Some index files failed to download. They have been ignored, or old ones used instead.


I have tried updating the nameservers in resolv.conf to no avail.

Not sure where to go from here seeing as I can't install any packages.
 

LarsR

Guru
Joined
Oct 23, 2020
Messages
719
you're not supposed to install additional packages as this is not stock debian but an appliance based on debian.
With Scale release apt was disabled because too many ppl. just used apt upgrade and broke dependencies of the middleware leading to a broken system.
 

natepichler

Dabbler
Joined
Feb 14, 2022
Messages
11
you're not supposed to install additional packages as this is not stock debian but an appliance based on debian.
With Scale release apt was disabled because too many ppl. just used apt upgrade and broke dependencies of the middleware leading to a broken system.
yes, but for truenas. Inside a container, you can use apt. It works if I install an "official" application, but not when i do it from the command line
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
I'm not clear on what you think the --ip 192.168.0.95 is doing.

Why wouldn't you leave that out?
 

efahl

Cadet
Joined
Feb 23, 2022
Messages
1
Try
Code:
nslookup -debug deb.debian.org
in that container and see what it tells you. I suspect that docker hasn't set up the DNS properly for the containers, which is what the first couple of lines in the output should reveal (although I have no idea how you would fix it).
 
Top