нет DNS, судя по тексту, а может быть и сети вообще.
нужно получить корректные настройки сети.
- Ссылка
А интернет и резолвинг DNS хоть работает?
ping 8.8.8.8
ping google.com
Kron4ek ★★★★★
(23.03.21 18:03:43 MSK)
- Ссылка
ping 8.8.8.8 = Network is unreachebale
ping google.comm = Temporary failure in name resolution
Во время инсталяции установщик ругнулся на отсутствие какого-то одного файла для вайфая, но дал продолжить, и как я понимаю, потом скачивал пакеты установки из интернета. Так что я подумал, что интернет работает. А вот нет 
aroot
(23.03.21 18:15:37 MSK)
- Показать ответы
- Ссылка
Кстати, если во время установки выбрать какое-то DE, гнома или кде, то все работает.
aroot
(23.03.21 18:18:56 MSK)
- Показать ответ
- Ссылка
Ответ на:
комментарий
от aroot 23.03.21 18:15:37 MSK
ЕМНИП доступность сети при установке debian не означает, что после установки debian сеть будет работать
anonymous
(23.03.21 18:19:11 MSK)
- Ссылка
Ответ на:
комментарий
от aroot 23.03.21 18:18:56 MSK
В DE обычно интегрирован NetworkManager – вот сеть и работает. Без DE ты сам должен собрать* поддержку сети (и не обязательно с помощью NetworkManager)
anonymous
(23.03.21 18:21:55 MSK)
- Ссылка
Хорошо, понял, буду разбираться. Спасибо за помощь.
Ветку закрываю тогда.
aroot
(23.03.21 18:25:10 MSK)
- Ссылка
Ответ на:
комментарий
от aroot 23.03.21 18:15:37 MSK
Во время инсталяции установщик ругнулся на отсутствие какого-то одного файла для вайфая
Он ругнулся на фирмварю для вафли- в штатном дебиане нет блобов, тебе нужен либо образ с блобами либо просто установить пакет с нужным блобом после установки с обычного образа — смотришь какой у тебя контроллер в вафле, гуглишь в каком пакете лежит блоб для него (там по сути всего 3-4 варианта для наиболее распространённых), качаешь его на флешку и ставишь на целевой машинке.
После чего ребутишься и настраиваешь сетку, если ставил минимал то у тебя как минимум есть wpa_supplicant
rukez ★★★★
(23.03.21 18:50:48 MSK)
- Показать ответ
- Ссылка
Ответ на:
комментарий
от rukez 23.03.21 18:50:48 MSK
Ответ на:
комментарий
от rukez 23.03.21 18:54:16 MSK
Ответ на:
комментарий
от rukez 23.03.21 18:54:16 MSK
Тут образы с блобами: https://cdimage.debian.org/cdimage/unofficial/non-free/firmware/
Да, я отсюда и брал iso.
Я пробовал ставить stable Дебиан 10.8 и testing Debian 11. Оба дистрибутива брал с firmware, потому что обычный дистрибутив ни 10, ни 11 не видели мою интеловскую карту вайфай на ноутбуке HP.
Если устанавливать Дебиан 10, то установщик ни на что не ругается, все в порядке. Спокойно качает пакеты с интернета во время установки. Если установить DE, то вообще все работает. Если без DE — как объяснили, мне надо самому настроить параметры сети. Я пока этого не сделал.
Если устанавливать Дебиан 11, то все как на 10, плюс ругается, что нет на флешке какого-то файла для карты вайфай. Но сетку ловит, качает пакеты для установки. И тоже, если установить DE — все полностью работает, а если без DE — надо настраивать параметры сети.
aroot
(23.03.21 23:22:21 MSK)
- Показать ответ
- Ссылка
если совсем никак а debian хочется то смотри в сторону based дистров типа lmde, mx linux, antix, devuan
anonymous
(24.03.21 00:12:17 MSK)
- Ссылка
Ответ на:
комментарий
от aroot 23.03.21 23:22:21 MSK
плюс ругается, что нет на флешке какого-то файла для карты вайфай
Ещё стоит убедится что в папке firmware лежат не Файлы нулевой длинны — у меня после руфуса стабильно так почему то 
А сеть да, надо настраивать с нуля, самый простой способ, после подтыкивания пакета с фирмварью (обычно это misc) закинуть в /etc/network/interfaces настройки точки с открытым паролем, ребутнуть машину (если фирмварь подцепится сразу то можно systemctl restart networking), навернуть де по вкусу с сетевым менеджером по вкусу (для пустого гнома, например gnome-core оно сразу с манагером идёт), потом затереть набранное в interfaces и после ребута получить готовую систему
rukez ★★★★
(24.03.21 00:13:37 MSK)
- Показать ответ
- Ссылка
Ответ на:
комментарий
от rukez 24.03.21 00:13:37 MSK
Да, все сделал.
Порядок такой:
-
Установил Дебиан без DE. Перезагрузка.
-
sudo iwconfig
Находим как определяется вайфай сеть. У меня wlo1
- sudo sensible-editor /etc/network/interfaces
Дописываем следующее содержание:
auto wlo1 где wlo1 — определяем из пункта 2
iface wlo1 inet dhcp где wlo1 — определяем из пункта 2
wpa-ssid тут указываем идентификатор сети вайфая
wpa-psk тут указываем пароль
Записываем изменения
-
sudo ifup wlo1 где wlo1 — определяем из пункта 2
-
sudo /etc/init.d/networking restart
-
ping 8.8.8.8 Проверяем наличие интернета
У меня так все начало работать.
Это решение не самое безопасное, но простое.
Спасибо всем кто помог советом!
aroot
(24.03.21 00:47:06 MSK)
- Показать ответы
- Ссылка
Из-за голосования ихнего многие от Debian уйдут наверное и их поглотит Canonical Ubuntu
anonymous
(27.03.21 21:42:23 MSK)
- Ссылка
Ответ на:
комментарий
от aroot 24.03.21 00:47:06 MSK
Это решение из 2003, на современном десктопе никто вручную вайфай не полнимает)
- Ссылка
Ответ на:
комментарий
от aroot 24.03.21 00:47:06 MSK
боже, какое же дебиан говно, просто ужас
anonymous
(27.03.21 22:01:20 MSK)
- Ссылка
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.
I have a Rails application that I want to deploy using Docker on an Ubuntu server. I have the Dockerfile for the application already set up, right now I want to view the nginx conf in its container.
I ran the command below to start an nginx container in an interactive mode:
docker run -i -t nginx:latest /bin/bash
Right now I am trying to install nano editor in order to view the configuration for nginx configuration (nginx.conf) using the commands below:
apt-get update
apt-get install nano
export TERM=xterm
However, when I run the first command apt-get update, I get the error below:
Err:1 http://security.debian.org/debian-security buster/updates InRelease
Temporary failure resolving 'security.debian.org'
Err:2 http://deb.debian.org/debian buster InRelease
Temporary failure resolving 'deb.debian.org'
Err:3 http://deb.debian.org/debian buster-updates InRelease
Temporary failure resolving 'deb.debian.org'
Reading package lists... Done
W: Failed to fetch http://deb.debian.org/debian/dists/buster/InRelease Temporary failure resolving 'deb.debian.org'
W: Failed to fetch http://security.debian.org/debian-security/dists/buster/updates/InRelease Temporary failure resolving 'security.debian.org'
W: Failed to fetch http://deb.debian.org/debian/dists/buster-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 checked very well it has nothing to do with network connectivity. I would need some help. Thank you.
asked May 2, 2020 at 22:58
Promise PrestonPromise Preston
22.8k12 gold badges137 silver badges140 bronze badges
1
Try restarting Docker.
sudo service docker restart or sudo /etc/init.d/docker restart
For this to work, Docker should have been working fine in the past. If you never had Docker working in the first place, you probably have a different issue.
answered Sep 24, 2020 at 20:14
4
Perhaps the network on the VM is not communicating with the default network created by docker during the build (bridge), so try «host» network :
docker build --network host -t [image_name]
for docker-compose:
service_name:
container_name: name
build:
context: .
network: host
answered Mar 19, 2021 at 20:00
manumazumanumazu
7534 silver badges2 bronze badges
9
If you have VPN running, stop it and try again. It solved for me!
answered Aug 14, 2020 at 15:26
1
Here’s how I solved it:
Start the docker container for the application in an interactive mode, in my case it an nginx container :
docker run -i -t nginx:latest /bin/bash
Run the command below to grant read permission to the others role for the resolv.conf file:
chmod o+r /etc/resolv.conf
Note: If you are having this issue on your host machine (Ubuntu Linux OS) and not for the Docker containers, then run the same command adding sudo to it in the host machine terminal:
sudo chmod o+r /etc/resolv.conf
Endeavour to exit your bash interactive terminal once you run this:
exit
And then open a new bash interactive terminal and run the commands again:
apt-get update
apt-get install nano
export TERM=xterm
Everything should work fine now.
Reference to this on Digital Ocean: Apt error: Temporary failure resolving ‘deb.debian.org’
That’s all.
Asclepius
56.5k17 gold badges164 silver badges142 bronze badges
answered May 2, 2020 at 22:58
Promise PrestonPromise Preston
22.8k12 gold badges137 silver badges140 bronze badges
1
sudo vi /etc/docker/daemon.json
and check flag of iptables, aslo add DNS if not added
{...., "iptables":true,"dns": ["8.8.8.8", "8.8.4.4"]}
then
sudo service docker restart
solved me
answered Apr 14, 2022 at 10:23
Victor OrletchiVictor Orletchi
4591 gold badge4 silver badges15 bronze badges
0
Run this command:
echo -e «nameserver 8.8.8.8nnameserver 8.8.4.4» |sudo tee -a /etc/resolv.conf
After that run-
sudo apt-get update
This worked for me.
answered May 20, 2022 at 6:30
1
I had the same problem and in my case it was file access control.
I uses extended acls on the docker root folder and did not realize it, because they where inherited from the folder above (stupid idea to test docker in a «scratch» directory where permissions are set via extended acls).
This lead to the situation that «/etc/resolv.conf» had setting «640» inside the running docker container with a «+» marking the extended acls. But the image did not have extended acls installed and could not handle it.
The weird thing was that, as far as I can see, all other network tools worked (e.g. ping) but only apt could no access the DNS resolver.
After removing the extended acls from the docker root and setting the usual acls, everything worked inside the running container.
Similar to the answer of «Promise Prestion», but solved permanently for new containers, too.
answered Mar 25, 2021 at 14:50
MarcoMarco
7947 silver badges12 bronze badges
1
Under Debian, as root, I’ve ran:
/etc/init.d/docker restart
This solved the issue for me.
Then build and run the container again.
sɐunıɔןɐqɐp
3,24215 gold badges34 silver badges39 bronze badges
answered Jan 27, 2021 at 19:17
0
I easily resolved it via:
- docker exec -it nginx bash (Go inside container)
- ping google.com (if not working)
- exit (Exit from container)
- sudo service docker restart
Please also confirms /etc/sysctl.conf
- net.ipv4.ip_forward = 1
sudo sysctl -p /etc/sysctl.conf
answered May 3, 2020 at 4:57
I had a similar issue, I tried many suggested solutions, but my issue was gone after I rebooted my VM.
Asclepius
56.5k17 gold badges164 silver badges142 bronze badges
answered Sep 2, 2020 at 14:30
babis21babis21
1,3951 gold badge15 silver badges29 bronze badges
I was having the wrong DNS IP address in my /etc/docker/daemon.json. In my case, it was my home router DNS IP address and I was trying from the office network.
I found out my office DNS and updated with that.
{
"dns": ["192.168.1.1"]
}
Eric Aya
69.4k35 gold badges181 silver badges252 bronze badges
answered Jun 29, 2022 at 17:59
1
Similar issue, under debian.
Root cause was a bad DOCKER-USER rule in iptables chain
Those rules have been haded
iptables -I DOCKER-USER -i eno1 -j DROP
iptables -I DOCKER-USER -s 90.62.xxx.xx/32 -i eno1 -j ACCEPT
so removing temporarily following rule fix the point
iptables -D DOCKER-USER -i eno1 -j DROP
answered Jul 15, 2021 at 13:35
Coming here from some docker cross compiling headache:
While forking some repo I manually downloaded its root folder containing confd stuff and added it just like the original maintainer did.
ADD root /
after this I was not able to apt update anymore.
I found that the permission of my root named folder was wrong. stat -f "%OLp" root revealed it is 700, but must be 755 to work.
answered Oct 9, 2021 at 22:02
MaxMax
5022 gold badges4 silver badges14 bronze badges
I’m using Arch version 6.0.11 and docker version 20.10.21, and having this issues inside docker containers.
Thanks to @Marco, that was the initial hint to solve this. The problem is related to the use of extended ACLs in the host system.
The docker root folder has ACLs, you can see this as it has a plus sign at the end of permissions «+»:
$ sudo ls -lh /var/lib/docker
drw-rw-r--+ 3 root root 4.0K Nov 24 2021 network
And what is the problem? Some docker images does not have ACLs installed, so as it was pointed this causes an issue.
Other network tools like curl resolved DNS properly, but apt or git have problems with DNS resolution.
TLDR; Where is the fix? Modify ACL to set default rx to others.
setfacl -R -d -m o::rx /var/lib/docker
After that, all network tools will be able to perform DNS resolution.
Credits:
Marco comment
Closed git issue in docker
Antoine
1,3954 gold badges20 silver badges26 bronze badges
answered Dec 11, 2022 at 18:55
The answer from @Mario Olivio Flores suggests using the service command. That is correct and probably works currently on all Linux distributions. However, as most Linux distributions prefer systemd over systemV, it seems better to use just that with the following command:
sudo systemctl restart docker
For example, on my Linux distribution the service script located at /usr/sbin/service just wraps systemctl, see this excerpt:
# When this machine is running systemd, standard service calls are turned into
# systemctl calls.
if [ -n "$is_systemd" ]
then
UNIT="${SERVICE%.sh}.service"
case "${ACTION}" in
restart|status|try-restart)
exec systemctl $sctl_args ${ACTION} ${UNIT}
;;
answered Feb 27 at 12:06
For me, it turned out to be a random WSL 2 issue — running wsl --shutdown and restarting the containers solved it for me.
answered Mar 27 at 14:22
Self-Hosted Version
22.8.0
CPU Architecture
x86_64
Docker Version
20.10.17
Docker Compose Version
2.6.0
Steps to Reproduce
mkdir -p /root/sentry
cd /root/sentry
rm -fr self-hosted
git clone https://github.com/getsentry/self-hosted.git
cd self-hosted
MY_NETWORK="my-overlay-network"
cat << EOF >> docker-compose.yml
networks:
default:
external: true
name: ${MY_NETWORK}
EOF
sed -i "s/${COMPOSE_PROJECT_NAME}_default/${MY_NETWORK}/g" ./install/wrap-up.sh
./install.sh --skip-user-prompt
In the above, I’m specifying a network as per #1302.
EDIT this issue seems to be unrelated to the use of a custom network as per above steps. I get the same failure resolving 'deb.debian.org' errors with a very basic install:
mkdir -p /root/sentry
cd /root/sentry
rm -fr self-hosted
git clone https://github.com/getsentry/self-hosted.git
cd self-hosted
./install.sh
Expected Result
No errors. It has worked up till now, though admittedly I haven’t tried for a couple of months so various dependencies may have been updated since then.
Actual Result
▶ Parsing command line ...
▶ Detecting Docker platform
Detected Docker platform is linux/amd64
▶ Initializing Docker Compose ...
▶ Setting up error handling ...
▶ Checking for latest commit ...
▶ Checking minimum requirements ...
Found Docker version 20.10.17
Found Docker Compose version 2.6.0
▶ Turning things off ...
Warning: No resource found to remove for project "sentry-self-hosted".
Warning: No resource found to remove for project "sentry_onpremise".
▶ Creating volumes for persistent storage ...
Created sentry-clickhouse.
Created sentry-data.
Created sentry-kafka.
Created sentry-postgres.
Created sentry-redis.
Created sentry-symbolicator.
Created sentry-zookeeper.
▶ Ensuring files from examples ...
../sentry/sentry.conf.py already exists, skipped creation.
../sentry/config.yml already exists, skipped creation.
../symbolicator/config.yml already exists, skipped creation.
▶ Ensuring Relay credentials ...
../relay/config.yml already exists, skipped creation.
../relay/credentials.json already exists, skipped creation.
▶ Generating secret key ...
▶ Replacing TSDB ...
▶ Fetching and updating Docker images ...
nightly: Pulling from getsentry/sentry
Digest: sha256:0ea35f9157c0dfd69b737d2d1de75a544bb17c605b7f6dd1107680c7e3e163af
Status: Image is up to date for getsentry/sentry:nightly
docker.io/getsentry/sentry:nightly
▶ Building and tagging Docker images ...
#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 32B done
#1 DONE 0.0s
#2 [internal] load .dockerignore
#2 transferring context: 2B done
#2 DONE 0.0s
#3 [internal] load metadata for docker.io/getsentry/sentry:nightly
#3 DONE 0.0s
#4 [1/4] FROM docker.io/getsentry/sentry:nightly
#4 DONE 0.0s
#5 [internal] load build context
#5 transferring context: 297B done
#5 DONE 0.0s
#6 [3/4] RUN if [ -s /usr/src/sentry/enhance-image.sh ]; then /usr/src/sentry/enhance-image.sh; fi
#6 CACHED
#7 [2/4] COPY . /usr/src/sentry
#7 CACHED
#8 [4/4] RUN if [ -s /usr/src/sentry/requirements.txt ]; then echo "sentry/requirements.txt is deprecated, use sentry/enhance-image.sh - see https://github.com/getsentry/self-hosted#enhance-sentry-image"; pip install -r /usr/src/sentry/requirements.txt; fi
#8 CACHED
#9 exporting to image
#9 exporting layers done
#9 writing image sha256:2c9148498c31b184fb6fe48ca088dd595677daaa0369072b81205f0b223cd616 done
#9 naming to docker.io/library/sentry-self-hosted-local done
#9 DONE 0.0s
#1 [sentry-cleanup-self-hosted-local internal] load build definition from Dockerfile
#1 transferring dockerfile: 32B done
#1 DONE 0.0s
#2 [sentry-self-hosted-local internal] load build definition from Dockerfile
#2 transferring dockerfile: 32B done
#2 DONE 0.0s
#3 [symbolicator-cleanup-self-hosted-local internal] load build definition from Dockerfile
#3 transferring dockerfile: 32B done
#3 DONE 0.0s
#4 [clickhouse-self-hosted-local internal] load build definition from Dockerfile
#4 transferring dockerfile: 31B done
#4 DONE 0.0s
#5 [snuba-cleanup-self-hosted-local internal] load build definition from Dockerfile
#5 transferring dockerfile: 32B done
#5 DONE 0.0s
#6 [snuba-cleanup-self-hosted-local internal] load .dockerignore
#6 transferring context: 2B done
#6 DONE 0.0s
#7 [sentry-cleanup-self-hosted-local internal] load .dockerignore
#7 transferring context: 2B done
#7 DONE 0.0s
#8 [symbolicator-cleanup-self-hosted-local internal] load .dockerignore
#8 transferring context: 2B done
#8 DONE 0.0s
#9 [clickhouse-self-hosted-local internal] load .dockerignore
#9 transferring context: 2B done
#9 DONE 0.0s
#10 [sentry-self-hosted-local internal] load .dockerignore
#10 transferring context: 2B done
#10 DONE 0.0s
#11 [sentry-cleanup-self-hosted-local internal] load metadata for docker.io/library/sentry-self-hosted-local:latest
#11 DONE 0.0s
#12 [sentry-cleanup-self-hosted-local 1/5] FROM docker.io/library/sentry-self-hosted-local
#12 DONE 0.0s
#13 [sentry-cleanup-self-hosted-local 2/5] RUN if [ -z "${http_proxy}" ]; then echo "Acquire::http::proxy "${http_proxy}";" >> /etc/apt/apt.conf; fi
#13 CACHED
#14 [sentry-cleanup-self-hosted-local internal] load build context
#14 transferring context: 35B done
#14 DONE 0.0s
#15 [sentry-cleanup-self-hosted-local 3/5] RUN if [ -z "${https_proxy}" ]; then echo "Acquire::https::proxy "${https_proxy}";" >> /etc/apt/apt.conf; fi
#15 ...
#16 [symbolicator-cleanup-self-hosted-local internal] load metadata for docker.io/getsentry/symbolicator:nightly
#16 DONE 0.0s
#17 [symbolicator-cleanup-self-hosted-local 1/5] FROM docker.io/getsentry/symbolicator:nightly
#17 DONE 0.0s
#18 [sentry-self-hosted-local internal] load metadata for docker.io/getsentry/sentry:nightly
#18 DONE 0.0s
#19 [sentry-self-hosted-local 1/4] FROM docker.io/getsentry/sentry:nightly
#19 DONE 0.0s
#20 [snuba-cleanup-self-hosted-local internal] load metadata for docker.io/getsentry/snuba:nightly
#20 DONE 0.0s
#21 [sentry-self-hosted-local internal] load build context
#21 transferring context: 297B done
#21 DONE 0.0s
#22 [sentry-self-hosted-local 2/4] COPY . /usr/src/sentry
#22 CACHED
#23 [sentry-self-hosted-local 3/4] RUN if [ -s /usr/src/sentry/enhance-image.sh ]; then /usr/src/sentry/enhance-image.sh; fi
#23 CACHED
#24 [sentry-self-hosted-local 4/4] RUN if [ -s /usr/src/sentry/requirements.txt ]; then echo "sentry/requirements.txt is deprecated, use sentry/enhance-image.sh - see https://github.com/getsentry/self-hosted#enhance-sentry-image"; pip install -r /usr/src/sentry/requirements.txt; fi
#24 CACHED
#25 [snuba-cleanup-self-hosted-local 1/5] FROM docker.io/getsentry/snuba:nightly
#25 DONE 0.0s
#26 [snuba-cleanup-self-hosted-local 2/5] RUN if [ -z "${http_proxy}" ]; then echo "Acquire::http::proxy "${http_proxy}";" >> /etc/apt/apt.conf; fi
#26 CACHED
#27 [snuba-cleanup-self-hosted-local 3/5] RUN if [ -z "${https_proxy}" ]; then echo "Acquire::https::proxy "${https_proxy}";" >> /etc/apt/apt.conf; fi
#27 CACHED
#28 [snuba-cleanup-self-hosted-local internal] load build context
#28 transferring context: 35B done
#28 DONE 0.0s
#29 [symbolicator-cleanup-self-hosted-local 2/5] RUN if [ -z "${http_proxy}" ]; then echo "Acquire::http::proxy "${http_proxy}";" >> /etc/apt/apt.conf; fi
#29 CACHED
#30 [symbolicator-cleanup-self-hosted-local 3/5] RUN if [ -z "${https_proxy}" ]; then echo "Acquire::https::proxy "${https_proxy}";" >> /etc/apt/apt.conf; fi
#30 CACHED
#31 [symbolicator-cleanup-self-hosted-local internal] load build context
#31 transferring context: 35B done
#31 DONE 0.0s
#32 [sentry-self-hosted-local] exporting to image
#32 exporting layers done
#32 writing image sha256:2c9148498c31b184fb6fe48ca088dd595677daaa0369072b81205f0b223cd616 done
#32 naming to docker.io/library/sentry-self-hosted-local done
#32 DONE 0.1s
#33 [clickhouse-self-hosted-local internal] load metadata for docker.io/yandex/clickhouse-server:20.3.9.70
#33 DONE 1.0s
#34 [clickhouse-self-hosted-local 1/1] FROM docker.io/yandex/clickhouse-server:20.3.9.70@sha256:932ef73994dd4b6507a55a288c5ee065aae8e77e61ee569512a76a65eddbe2c3
#34 DONE 0.0s
#35 [symbolicator-cleanup-self-hosted-local 4/5] RUN apt-get update && apt-get install -y --no-install-recommends cron && rm -r /var/lib/apt/lists/*
#35 ...
#15 [sentry-cleanup-self-hosted-local 3/5] RUN if [ -z "${https_proxy}" ]; then echo "Acquire::https::proxy "${https_proxy}";" >> /etc/apt/apt.conf; fi
#15 DONE 1.2s
#34 [clickhouse-self-hosted-local 1/1] FROM docker.io/yandex/clickhouse-server:20.3.9.70@sha256:932ef73994dd4b6507a55a288c5ee065aae8e77e61ee569512a76a65eddbe2c3
#34 resolve docker.io/yandex/clickhouse-server:20.3.9.70@sha256:932ef73994dd4b6507a55a288c5ee065aae8e77e61ee569512a76a65eddbe2c3 done
#34 sha256:2910811b6c4227c2f42aaea9a3dd5f53b1d469f67e2cf7e601f631b119b61ff7 0B / 847B 0.1s
#34 sha256:abe55fc6544d42937af1eccad0a639a039bded091b0972124d3069eba82089b8 7.93kB / 7.93kB done
#34 sha256:23884877105a7ff84a910895cd044061a4561385ff6c36480ee080b76ec0e771 0B / 26.69MB 0.1s
#34 sha256:932ef73994dd4b6507a55a288c5ee065aae8e77e61ee569512a76a65eddbe2c3 2.62kB / 2.62kB done
#34 sha256:bc38caa0f5b94141276220daaf428892096e4afd24b05668cd188311e00a635f 0B / 35.37kB 0.1s
#34 sha256:bc38caa0f5b94141276220daaf428892096e4afd24b05668cd188311e00a635f 35.37kB / 35.37kB 0.4s done
#34 CANCELED
#36 [snuba-cleanup-self-hosted-local 4/5] RUN apt-get update && apt-get install -y --no-install-recommends cron && rm -r /var/lib/apt/lists/*
#0 1.169 Err:1 http://deb.debian.org/debian bullseye InRelease
#0 1.169 Temporary failure resolving 'deb.debian.org'
#0 1.171 Err:2 http://deb.debian.org/debian-security bullseye-security InRelease
#0 1.171 Temporary failure resolving 'deb.debian.org'
#0 1.171 Err:3 http://deb.debian.org/debian bullseye-updates InRelease
#0 1.171 Temporary failure resolving 'deb.debian.org'
#0 1.181 Reading package lists...
#0 1.210 W: Failed to fetch http://deb.debian.org/debian/dists/bullseye/InRelease Temporary failure resolving 'deb.debian.org'
#0 1.210 W: Failed to fetch http://deb.debian.org/debian-security/dists/bullseye-security/InRelease Temporary failure resolving 'deb.debian.org'
#0 1.210 W: Failed to fetch http://deb.debian.org/debian/dists/bullseye-updates/InRelease Temporary failure resolving 'deb.debian.org'
#0 1.210 W: Some index files failed to download. They have been ignored, or old ones used instead.
#0 1.223 Reading package lists...
#0 1.238 Building dependency tree...
#0 1.238 Reading state information...
#0 1.250 E: Unable to locate package cron
#36 ERROR: executor failed running [/bin/sh -c apt-get update && apt-get install -y --no-install-recommends cron && rm -r /var/lib/apt/lists/*]: exit code: 100
… and so on… lots of Temporary failure resolving 'deb.debian.org' etc.
Restarting Docker doesn’t help (as suggested e.g. here).
-
Léa Massiot
- Posts: 28
- Joined: 2011-10-16 12:30
Temporary failure resolving ‘deb.debian.org’
#1
Post
by Léa Massiot » 2020-11-27 14:49
Hi,
I am trying to update my Debian Buster machine.
My «/etc/apt/sources.lists» is:
Code: Select all
# Security updates
deb http://security.debian.org/ buster/updates main contrib non-free
deb-src http://security.debian.org/ buster/updates main contrib non-free
## Debian mirror
# Base repository
deb https://deb.debian.org/debian buster main contrib non-free
deb-src https://deb.debian.org/debian buster main contrib non-free
# Stable updates
deb https://deb.debian.org/debian buster-updates main contrib non-free
deb-src https://deb.debian.org/debian buster-updates main contrib non-free
# Stable backports
deb https://deb.debian.org/debian buster-backports main contrib non-free
deb-src https://deb.debian.org/debian buster-backports main contrib non-free
I am getting the errors below:
Code: Select all
root# apt-get update
Hit:1 http://security.debian.org buster/updates InRelease
Err:2 https://deb.debian.org/debian buster InRelease
Temporary failure resolving 'debian.map.fastly.net' Temporary failure resolving 'deb.debian.org'
Err:3 https://deb.debian.org/debian buster-updates InRelease
Temporary failure resolving 'debian.map.fastly.net' Temporary failure resolving 'deb.debian.org'
Err:4 https://deb.debian.org/debian buster-backports InRelease
Temporary failure resolving 'debian.map.fastly.net' Temporary failure resolving 'deb.debian.org'
Reading package lists... Done
W: Failed to fetch https://deb.debian.org/debian/dists/buster/InRelease Temporary failure resolving 'debian.map.fastly.net' Temporary failure resolving 'deb.debian.org'
W: Failed to fetch https://deb.debian.org/debian/dists/buster-updates/InRelease Temporary failure resolving 'debian.map.fastly.net' Temporary failure resolving 'deb.debian.org'
W: Failed to fetch https://deb.debian.org/debian/dists/buster-backports/InRelease Temporary failure resolving 'debian.map.fastly.net' Temporary failure resolving 'deb.debian.org'
W: Some index files failed to download. They have been ignored, or old ones used instead.
Best regards.
On a debian buster machine without internet access, most of apt command (like apt install/remove/autoremove) show the following error :
The following packages have unmet dependencies:
systemd : Depends: libsystemd0 (= 241-7~deb10u6) but 241-7~deb10u8 is to be installed
Recommends: libpam-systemd but it is not installable
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
When trying to run apt --fix-broken install, I get this error :
root@debian10-h1:/var/cuda-repo-debian10-11-4-local# apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
big list of packages
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
systemd
0 upgraded, 0 newly installed, 1 to remove and 1 not upgraded.
After this operation, 13.8 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 114294 files and directories currently installed.)
Removing systemd (241-7~deb10u6) ...
systemd is the active init system, please switch to another before removing systemd.
dpkg: error processing package systemd (--remove):
installed systemd package pre-removal script subprocess returned error exit status 1
Errors were encountered while processing:
systemd
E: Sub-process /usr/bin/dpkg returned an error code (1)
How I got there
I had to install a program on a debian buster server without internet access. Up until now, when I had to install something via apt, I’d run apt-get download $(apt-cache depends --recurse --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances <your-package-here> | grep "^w" | sort -u) on a VM to download the .deb files from the packages and all dependencies, transfer the files to my target machine and then run dpkg -i *.deb to install there, which was working fine.
I had to install CUDA, so I followed the nvidia installation guide. At some point, I’m supposed to run those command :
wget https://developer.download.nvidia.com/compute/cuda/11.4.0/local_installers/cuda-repo-debian10-11-4-local_11.4.0-470.42.01-1_amd64.deb
sudo dpkg -i cuda-repo-debian10-11-4-local_11.4.0-470.42.01-1_amd64.deb
sudo apt-key add /var/cuda-repo-debian10-11-4-local/7fa2af80.pub
sudo add-apt-repository contrib
sudo apt-get update
sudo apt-get -y install cuda
I did the first 4 commands without any problem (the first on my VM with internet connection), but since I didn’t have an internet connection, the 5th one failed :
root@debian10-h1:/home/user/installation# apt-get update
Get:1 file:/var/cuda-repo-debian10-11-4-local InRelease
Ign:1 file:/var/cuda-repo-debian10-11-4-local InRelease
Get:2 file:/var/cuda-repo-debian10-11-4-local Release [564 B]
Get:2 file:/var/cuda-repo-debian10-11-4-local Release [564 B]
Err:4 http://deb.debian.org/debian buster InRelease
Temporary failure resolving 'deb.debian.org'
Reading package lists... Done
W: Failed to fetch http://deb.debian.org/debian/dists/buster/InRelease Temporary failure resolving 'deb.debian.org'
W: Some index files failed to download. They have been ignored, or old ones used instead.
and the 6th too :
root@debian10-h1:/home/user/installation# apt-get -y install cuda
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
apt-utils : Depends: apt (= 1.8.2.2) but 1.8.2.3 is to be installed
cuda : Depends: cuda-11-4 (>= 11.4.0) but it is not going to be installed
libglib2.0-bin : Depends: libglib2.0-0 (= 2.58.3-2+deb10u2) but 2.58.3-2+deb10u
3 is to be installed
libpython3.7 : Depends: libpython3.7-stdlib (= 3.7.3-2+deb10u2) but 3.7.3-2+deb10u3 is to be installed
systemd : Depends: libsystemd0 (= 241-7~deb10u6) but 241-7~deb10u8 is to be installed
udev : Depends: libudev1 (= 241-7~deb10u6) but 241-7~deb10u8 is to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
So I tried apt --fix-broken install :
root@debian10-h1:/home/user/installation# apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
big list of packages
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
big list of packages
WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
init systemd-sysv (due to init)
0 upgraded, 0 newly installed, 58 to remove and 1 not upgraded.
After this operation, 364 MB disk space will be freed.
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'
?]n
I tried to do apt autoremove as suggested but I got the same E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution). as before. Same with apt remove cuda.
Thinking that it didn’t work because of the problem during apt-get update, I tried to do the update via apt-offline, but once again was asked to use apt --fix-broken install :
root@debian10-h1:/home/user/installation# apt-offline set ./my.sig
Generating database of files that are needed for an update.
Generating database of file that are needed for operation upgrade
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
ERROR: FATAL: Something is wrong with the APT system
Since I didn’t find anything else to do, I retried apt --fix-broken install but this time accepting to continue :
root@debian10-h1:/home/user/installation# apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
big list of packages
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
big list of packages
WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
init systemd-sysv (due to init)
0 upgraded, 0 newly installed, 58 to remove and 1 not upgraded.
After this operation, 364 MB disk space will be freed.
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'
?]Yes, do as I say!
(Reading database ... 120959 files and directories currently installed.)
Lot of others thing were removed, I just kept the ones where I got a different message, can post the full list if needed.
Removing linux-image-amd64 (4.19+105+deb10u9) ...
Removing linux-image-4.19.0-14-amd64 (4.19.171-2) ...
W: Removing the running kernel
W: Last kernel image has been removed, so removing the default symlinks
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-4.19.0-14-amd64
/etc/kernel/postrm.d/zz-update-grub:
Generating grub configuration file ...
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Adding boot menu entry for EFI firmware configuration
done
update-initramfs: deferring update (trigger activated)
Removing initramfs-tools (0.133+deb10u1) ...
Removing initramfs-tools-core (0.133+deb10u1) ...
Removing systemd (241-7~deb10u6) ...
systemd is the active init system, please switch to another before removing systemd.
dpkg: error processing package systemd (--remove):
installed systemd package pre-removal script subprocess returned error exit status 1
Errors were encountered while processing:
systemd
E: Sub-process /usr/bin/dpkg returned an error code (1)
What I already tried
-
Followed https://askubuntu.com/a/1093253 :
sudo apt-get cleandon’t show anything,root@debian10-h1:/home/user# dpkg --configure -a Processing triggers for mime-support (3.62) ... Processing triggers for hicolor-icon-theme (0.17-2) ... Processing triggers for libglib2.0-0:amd64 (2.58.3-2+deb10u3) ... Processing triggers for libc-bin (2.28-10) ... Processing triggers for man-db (2.8.5-2) ... Processing triggers for libreoffice-common (1:6.1.5-3+deb10u6) ... Processing triggers for dbus (1.12.20-0+deb10u1) ... Processing triggers for desktop-file-utils (0.23-4) ...
and sudo apt upgrade --fix-missing ask me to do apt --fix-broken install again.
-
Followed https://askubuntu.com/a/1244984, but
stat / /dev /varshow that root is the owner of all 3 directories. -
Followed https://askubuntu.com/a/380701, but
sudo fuser -v /var/cache/debconf/config.datshow nothing. (+ I don’t think it’s exactly the same problem).
I was wondering if anyone knew how to solve that problem, I can provide more informations if needed.
Go to debian
r/debian
Subreddit to discuss all the Debian things, the Universal Operating System
Members
Online
•
«Temporary failure resolving ‘deb.debian.org'»
I’m getting 3 error messages just like this one whenever I try to use the apt-get update command. I am a beginner using Debian so the solution is probably something very simple I’ve overlooked lol. I’ve tried «chmod o+r /etc/resolv.conf» but it doesn’t seem to do anything and I still get the failures afterwards. Any help would be appreciated.
Почему не устанавливаются программы с репозиториев Debian?
.а если делается, то и все в этом
все в порядке(или нет?),
надо же, нашёл
После простоя пару месяцев,
dpkg —purge —force-remove-reinstreq apache2.2-common dpkg-reconfigure apache2.2-common
Ответы:
ValeriyaWork qna.habr.comНачалось как мне кажется
Debian 11 — Известные ошибки
- Проблемы безопасности
- Редакции выпусков
- Система установки
Проблемы безопасности
upgrade.на всех зеркалах Debian.Исправления выпущенного стабильного дистрибутива выпущена update и затем apt bullseye, смотрите на Источник: Хотела установить Chromium. Вышлв как?
духе, собственно вопрос, как он показывает результат и в /etc/environment была строка загрузил debian 10. При
deb http://security.debian.org/debian-security bullseye-security main contrib non-free
apt-get install apache2
или2015-05-27 21:11:19
Редакции выпусков
это после неудачной установки Информацию об известных ошибках Если для обновления пакетов часто должны пройти усиленное 9 октября 2021 года
- upgrade.страницах безопасности.такая ошибка, и на
akgndkut узнать. что интернет точно не выдает ошибку, так http_proxy=обновлении Synaptic показал ошибку:
mureevmsapt-get purge apache2.2-commonshaivamredmine через команду
и обновлениях в системе вы используете APT, то тестирование, прежде чем они . Иногда, в случаях множества
.Команда безопасности Debian выпускает все команды так пишет.
2016-05-20 01:48:42подключен в debian и
# предлагаемые дополнения для редакции 11-ого выпуска deb http://ftp.us.debian.org/debian bullseye-proposed-updates main contrib non-free
же с гуглом или localhost:9080Спасибо за помощь.
Система установки
2015-05-28 06:17:53apt-get install apache2.2-common
2015-05-27 22:06:36Второй день не могу установки смотрите на страницах
можете установить предлагаемые обновления, debian.orgбудут помещены в архив.
Как разрешить проблему зависимостей в debian?
# apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libcurl3-nss libnspr4 libnspr4-dev libnss3 libnss3-dev
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 103 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up apache2.2-common (2.2.22-13+deb7u4) ...
insserv: warning: script 'celery' missing LSB tags and overrides
insserv: There is a loop between service monit and celery if stopped
insserv: loop involving service celery at depth 2
insserv: loop involving service monit at depth 1
insserv: Stopping celery depends on monit and therefore on system facility `$all' which can not be true!
insserv: exiting now without changing boot order!
update-rc.d: error: insserv rejected the script header
dpkg: error processing apache2.2-common (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of apache2-mpm-itk:
apache2-mpm-itk depends on apache2.2-common (= 2.2.22-13+deb7u4); however:
Package apache2.2-common is not configured yet.
dpkg: error processing apache2-mpm-itk (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of apache2-threaded-dev:
apache2-threaded-dev depends on apache2.2-common (= 2.2.22-13+deb7u4); however:
Package apache2.2-common is not configured yet.
dpkg: error processing apache2-threaded-dev (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
apache2.2-common
apache2-mpm-itk
apache2-threaded-dev
E: Sub-process /usr/bin/dpkg returned an error code (1)
Подробную информацию об изменениях критических проблем или обновлений Если вы используете APT,
apt-get install redmine
обновления пакетов в стабильном Не удалось разрешить «deb.debian.o
bigton
если при подключении в айпи провайдера, но после
# apt-get install libaprutil1-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libaprutil1-dev is already the newest version.
The following packages were automatically installed and are no longer required:
libcurl3-nss libnspr4 libnspr4-dev libnss3 libnss3-dev
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 103 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? Y
Setting up apache2.2-common (2.2.22-13+deb7u4) ...
insserv: warning: script 'celery' missing LSB tags and overrides
insserv: There is a loop between service monit and celery if stopped
insserv: loop involving service celery at depth 2
insserv: loop involving service monit at depth 1
insserv: Stopping celery depends on monit and therefore on system facility `$all' which can not be true!
insserv: exiting now without changing boot order!
update-rc.d: error: insserv rejected the script header
dpkg: error processing apache2.2-common (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of apache2-mpm-itk:
apache2-mpm-itk depends on apache2.2-common (= 2.2.22-13+deb7u4); however:
Package apache2.2-common is not configured yet.
dpkg: error processing apache2-mpm-itk (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of apache2-threaded-dev:
apache2-threaded-dev depends on apache2.2-common (= 2.2.22-13+deb7u4); however:
Package apache2.2-common is not configured yet.
dpkg: error processing apache2-threaded-dev (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
apache2.2-common
apache2-mpm-itk
apache2-threaded-dev
E: Sub-process /usr/bin/dpkg returned an error code (1)
Источник: doitagain
Ответы:
-
Попробуйте shaivam
обычно подобный пост нужно найти решения, в администрировании
системы установкидобавив следующую строку в
Тем не менее, эти
между версиями 11 и
безопасности, выпущенный дистрибутив обновляется.
добавьте следующую строку в Комментарии:
-
2020-12-05 01:13:43 это решение
2015-05-27 23:18:07сопровождать sources.list.
серверов новичек
qna.habr.com.
Как исправить synaptic в debian 10 buster?
файл /etc/apt/sources.list:исправления уже доступны в 11.1 смотрите в
Невозможно получить все индексы репозитория
Возможно репозиторий больше не доступен или к нему нет доступа из-за сетевых проблем. Будет использована старая версия индекса, если она имеется. В противном случае репозиторий будет игнорирован. Проверьте сетевое соединение и правильность написания адреса репозитория в настройках.
Не удалось получить http://mirror.mephi.ru/debian/dists/buster/InRelease Не удалось соединиться с localhost:9080 (::1). - connect (111: В соединении отказано) Не удалось соединиться с localhost:9080 (127.0.0.1). - connect (111: В соединении отказано)Не удалось получить http://security.debian.org/debian-security/dists/buster/updates/InRelease Не удалось соединиться с localhost:9080 (::1). - connect (111: В соединении отказано) Не удалось соединиться с localhost:9080 (127.0.0.1). - connect (111: В соединении отказано)Не удалось получить http://mirror.mephi.ru/debian/dists/buster-updates/InRelease Невозможно соединиться с localhost:9080:Не удалось получить https://deb.torproject.org/torproject.org/dists/buster/InRelease Не удалось соединиться с localhost:9080 (::1). - connect (111: В соединении отказано) Не удалось соединиться с localhost:9080 (127.0.0.1). - connect (111: В соединении отказано)Не удалось получить http://ftp.debian.org/debian/dists/buster/InRelease Не удалось соединиться с localhost:9080 (::1). - connect (111: В соединении отказано) Не удалось соединиться с localhost:9080 (127.0.0.1). - connect (111: В соединении отказано)Не удалось получить http://ftp.debian.org/debian/dists/buster-updates/InRelease Невозможно соединиться с localhost:9080:Не удалось получить http://security.debian.org/dists/buster/updates/InRelease Невозможно соединиться с localhost:9080:Не удалось получить http://ftp.debian.org/debian/dists/buster-backports/InRelease Невозможно соединиться с localhost:9080:Некоторые индексные файлы скачать не удалось. Они были проигнорированы, или вместо них были использованы старые версии.
Обычно эти выпуски обозначаются
/etc/apt/sources.list, чтобы получить доступ обнаружили проблемы, относящиеся к
Ответы:
-
rg»
Может быть что-то с
вводить логин и пароль, в sources.list адреса до Если пинговать ip серверов doitagain Автор вопроса
Источник: qna.habr.comValeriyaWork: если не поможет,
Почему не происходит обновление пакетов Debian?
Выложите, пожалуйста.Нужно доустановить пакеты apache, Источник: После этого запустите apt каталоге журнале измененийкак редакции выпусков.к последним обновлениям безопасности:безопасности. Информацию о всех olesya99 iptables? Закрыли доступ?
то почему этого не обновления системы, ввел aptitude обновления debian, то здесь 2020-12-05 18:18:05.тогда така что выдаст если:но не получается, например
.update и затем apt dists/bullseye-proposed-updates
. Первая редакция, 11.1, была
Ответы:
-
После этого запустите apt проблемах безопасности, найденных в
2021-01-08 09:36:22Источник:
делается в консоли линукса, qna.habr.comupdate все, ошибка подключения
Похожие статьи
I found some weird issue when trying to build my docker image in my house, although I am not sure if it’s correlated to browser or just a network issue.
So here’s what I got. I tried to run this command in my Dockerfile.
RUN apt-get update -qq &&
apt-get install -y build-essential
libpq-dev
postgresql-client
After waiting for a moment, somewhat the process output something like this.
W: Failed to fetch http://deb.debian.org/debian/dists/jessie/InRelease
W: Failed to fetch http://deb.debian.org/debian/dists/jessie-updates/InRelease
W: Failed to fetch http://security.debian.org/dists/jessie/updates/InRelease
W: Failed to fetch http://deb.debian.org/debian/dists/jessie/Release.gpg Temporary failure resolving 'deb.debian.org'
W: Failed to fetch http://security.debian.org/dists/jessie/updates/Release.gpg Temporary failure resolving 'security.debian.org'
W: Failed to fetch http://deb.debian.org/debian/dists/jessie-updates/Release.gpg Temporary failure resolving 'deb.debian.org'
W: Some index files failed to download. They have been ignored, or old ones used instead.
The weird thing is that, if I tried this in my office network, this does not happen. And then if I tried tethering to my cellphone data network, this also does not happen.
I tried opening http://deb.debian.org/debian/dists/jessie/InRelease in browser, it shows 404. I tried using Tor browser via several networks, it also shows 404.
The docker image is based on ruby:2.3.1.
UPDATE
I tried to use the DNS provided by my house provider 203.142.82.222.
sudo docker run --dns 203.142.82.222 busybox nslookup google.com
This resolves
Server: 203.142.82.222
Address 1: 203.142.82.222 dns-cache1.biz.net.id
Name: google.com
Address 1: 2404:6800:4003:808::200e sin10s07-in-x0e.1e100.net
Address 2: 117.102.117.245
Address 3: 117.102.117.251
Address 4: 117.102.117.212
But then I changed to /etc/default/docker file and added this.
DOCKER_OPTS="--dns 203.142.82.222 --dns 203.142.84.222"
After I restarted the docker sudo service docker restart, I tried again but it’s still not working.
sudo service docker restart
sudo docker run busybox nslookup google.com
Server: 8.8.8.8
Address 1: 8.8.8.8
nslookup: can't resolve 'google.com'
Issue
I have a Rails application that I want to deploy using Docker on an Ubuntu server. I have the Dockerfile for the application already set up, right now I want to view the nginx conf in its container.
I ran the command below to start an nginx container in an interactive mode:
docker run -i -t nginx:latest /bin/bash
Right now I am trying to install nano editor in order to view the configuration for nginx configuration (nginx.conf) using the commands below:
apt-get update
apt-get install nano
export TERM=xterm
However, when I run the first command apt-get update, I get the error below:
Err:1 http://security.debian.org/debian-security buster/updates InRelease
Temporary failure resolving 'security.debian.org'
Err:2 http://deb.debian.org/debian buster InRelease
Temporary failure resolving 'deb.debian.org'
Err:3 http://deb.debian.org/debian buster-updates InRelease
Temporary failure resolving 'deb.debian.org'
Reading package lists... Done
W: Failed to fetch http://deb.debian.org/debian/dists/buster/InRelease Temporary failure resolving 'deb.debian.org'
W: Failed to fetch http://security.debian.org/debian-security/dists/buster/updates/InRelease Temporary failure resolving 'security.debian.org'
W: Failed to fetch http://deb.debian.org/debian/dists/buster-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 checked very well it has nothing to do with network connectivity. I would need some help. Thank you.
Solution
Here’s how I solved it:
Start the docker container for the application in an interactive mode, in my case it an nginx container :
docker run -i -t nginx:latest /bin/bash
Run the command below to grant read permission to the others role for the resolv.conf file:
chmod o+r /etc/resolv.conf
Note: If you are having this issue on your host machine (Ubuntu Linux OS) and not for the Docker containers, then run the same command adding sudo to it in the host machine terminal:
sudo chmod o+r /etc/resolv.conf
Endeavour to exit your bash interactive terminal once you run this:
exit
And then open a new bash interactive terminal and run the commands again:
apt-get update
apt-get install nano
export TERM=xterm
Everything should work fine now.
Reference to this on Digital Ocean: Apt error: Temporary failure resolving ‘deb.debian.org’
That’s all.
I hope this helps
Answered By — Promise Preston




