I'm running Debian 11 on a VPS, I followed step by step the instruction here : https://docs.docker.com/engine/install/debian/#install-using-the-repository
after setting up the repository, apt-get update returns this :
Ign:4 https://download.docker.com/linux/debian \ InRelease
Err:5 https://download.docker.com/linux/debian \ Release
404 Not Found [IP: 2600:9000:218f:9400:3:db06:4200:93a1 443]
Reading package lists... Done
E: The repository 'https://download.docker.com/linux/debian/ \ 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.
I checked /etc/apt/sources.list and I can'y see any docker mirror, is it normal ?
I do not know what to do.
thxs
Related
My team uses Docker (with ubuntu:14.04 base image) for local development and we often have to rebuild some or all of our images. But we often get failures downloading packages with apt-get install, even immediately after running apt-get -y update. For instance, today I see
Err http://archive.ubuntu.com/ubuntu/ trusty-security/main libxml2 amd64 2.9.1+dfsg1-3ubuntu4.7
404 Not Found [IP: 91.189.88.161 80]
Err http://archive.ubuntu.com/ubuntu/ trusty-security/main libxml2-dev amd64 2.9.1+dfsg1-3ubuntu4.7
404 Not Found [IP: 91.189.88.161 80]
Fetched 84.7 MB in 1min 6s (1281 kB/s)
Unable to correct missing packages.
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/libx/libxml2/libxml2_2.9.1+dfsg1-3ubuntu4.7_amd64.deb 404 Not Found [IP: 91.189.88.161 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/libx/libxml2/libxml2-dev_2.9.1+dfsg1-3ubuntu4.7_amd64.deb 404 Not Found [IP: 91.189.88.161 80]
E: Aborting install.
Apparently the specific version of a particular package has been deleted from the archive and replaced with a slightly differently named patch version. For instance, the above error is looking for libxml2_2.9.1+dfsg1-3ubuntu4.7_amd64.deb but the version on the server is libxml2_2.9.1+dfsg1-3ubuntu4.8_amd64.deb.
Often this is solvable by removing the base image (docker rmi ubuntu:14.04) and rebuilding; the newly downloaded ubuntu image has the correct patch number and finds the right archive file. But even this doesn't always work -- probably due to a delay between a new minor upgrade to Ubuntu's dependency db and the deployment of that new ubuntu:14.04 image onto Docker Hub.
We've tried using apt-get flags --fix-missing and --fix-broken and those don't consistently work either.
Any other ideas?
apt-get install fails with Not Found error because package removed from repository is a similar problem but the accepted answer is unacceptable because it's not possible to be automated. Our daily development process, including automatic build and deploy, is all scripted and using Docker and it's not practical to hack around inside a Dockerfile every time a particular archive goes missing (then remove the hack after a few hours or days).
In response to #prateek05, here's the /etc/apt/sources.list from the official ubuntu:14.04 docker image:
root#72daa1942714:/# cat /etc/apt/sources.list
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://archive.ubuntu.com/ubuntu/ trusty main restricted
deb-src http://archive.ubuntu.com/ubuntu/ trusty main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted
deb-src http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted
## Uncomment the following two lines to add software from the 'universe'
## repository.
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://archive.ubuntu.com/ubuntu/ trusty universe
deb-src http://archive.ubuntu.com/ubuntu/ trusty universe
deb http://archive.ubuntu.com/ubuntu/ trusty-updates universe
deb-src http://archive.ubuntu.com/ubuntu/ trusty-updates universe
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted
# deb-src http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted
deb http://archive.ubuntu.com/ubuntu/ trusty-security main restricted
deb-src http://archive.ubuntu.com/ubuntu/ trusty-security main restricted
deb http://archive.ubuntu.com/ubuntu/ trusty-security universe
deb-src http://archive.ubuntu.com/ubuntu/ trusty-security universe
# deb http://archive.ubuntu.com/ubuntu/ trusty-security multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ trusty-security multiverse
You have stated that your Dockerfile contains RUN apt-get -y update as its own RUN instruction. However, due to build caching, if all changes to the Dockerfile occur later in the file, when docker build is run, Docker will reuse the intermediate image created the last time RUN apt-get -y update executed instead of running the command again, and so any recently-added or -edited apt-get install lines will be using old data, leading to the errors you've observed.
There are two ways to fix this:
Pass the --no-cache option to docker build, forcing every statement in the Dockerfile to be run every time the image is built.
Rewrite the Dockerfile to combine the apt-get commands in a single RUN instruction: RUN apt-get update && apt-get install foo bar .... This way, whenever the list of packages to install is edited, docker build will be forced to re-execute the entire RUN instruction and thus rerun apt-get update before installing.
The Dockerfile best practices page actually has an entire section on apt-get commands in Dockerfiles. I suggest you read it.
The issue could be potentially with the ubuntu sources
Check /etc/apt/sources.list
If you see deb http://archive.ubuntu.com/ubuntu main universe restricted multiverse , that could be the potential issue.
Fix that by replacing it with deb http://archive.ubuntu.com/ubuntu/ trusty main universe restricted multiverse
Alternatively it could be the mirror itself doesn't respond. archive.ubuntu.com
Name: archive.ubuntu.com
Address: 91.189.88.152
Name: archive.ubuntu.com
Address: 91.189.88.161
Name: archive.ubuntu.com
Address: 91.189.88.149
Replace archive.ubuntu.com with a more trusted mirror say us.archive.ubuntu.com
Name: us.archive.ubuntu.com
Address: 91.189.91.23
Name: us.archive.ubuntu.com
Address: 91.189.91.26
(edit by the oiriginal asker):
Thanks, prateek05! My Dockerfile now starts:
FROM ubuntu:14.04
RUN sed -i'' 's/archive\.ubuntu\.com/us\.archive\.ubuntu\.com/' /etc/apt/sources.list
RUN apt-get -y update
and it seems to be working. But since this is a sporadic issue, only time will tell...
In my case the problem was caused by the parent image since it had not cleared the apt cache properly.
I solve the problem including cleaning commands before the first apt update ...
RUN apt clean && \
rm -rf /var/lib/apt/lists/* && \
apt update && \
...
Hope this helps
Found something that works!
So I found this:
https://www.mail-archive.com/ubuntu-bugs#lists.ubuntu.com/msg5682159.html
The solution is to create a pinning_file with the contents
# Written by ubuntu-advantage-tools
Package: *
Pin: release o=UbuntuESM, n=trusty
Pin-Priority: never
Then add
COPY pinning_file /etc/apt/preferences.d/ubuntu-esm-infra-trusty
To you Dockerfile before you run the sudo apt-get -y update
I was able to fix this error only after adding some extra arguments to apt-get to deal with http issues:
sudo apt-get \
-o Acquire::BrokenProxy="true" \
-o Acquire::http::No-Cache="true" \
-o Acquire::http::Pipeline-Depth="0" install \
ignition
What worked for me ...
I had the statements in two lines, but when i merged to one it worked (don't know if it was cache related ...)
it was
RUN apt-get -y update && apt-get upgrade -y
# Install tools && libraries
RUN apt-get -y install --fix-missing apt-utils iputils-ping nano wget dialog \
build-essential git zip \
And then i changed to
RUN apt-get -y update && apt-get upgrade -y \
&& apt-get -y install --fix-missing apt-utils nano wget \
git zip \
mysql-client \
Using FTP sources works 100% of the time.
RUN echo \
'deb ftp://ftp.us.debian.org/debian/ jessie main\n \
deb ftp://ftp.us.debian.org/debian/ jessie-updates main\n \
deb http://security.debian.org jessie/updates main\n' \
> /etc/apt/sources.list
I try to update docker on Debian, with the following command:
sudo apt-get update --allow-releaseinfo-change
But I got the following error message:
Hit:1 http://asi-fs-n.contabo.net/debian buster InRelease
Hit:2 http://asi-fs-n.contabo.net/debian buster-updates InRelease
Hit:3 http://security.debian.org/debian-security buster/updates InRelease
Get:4 https://download.docker.com/linux/debian buster InRelease [54.0 kB]
Hit:5 https://download.docker.com/linux/ubuntu zesty InRelease
Ign:6 https://download.docker.com/linux/ubuntu docker InRelease
Err:7 https://download.docker.com/linux/ubuntu docker Release
404 Not Found [IP: 13.224.94.87 443]
Reading package lists... Done
E: The repository 'https://download.docker.com/linux/ubuntu docker 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.
From another StackOverflow topic, it seems I must update the file /etc/apt/sources.list.d/docker.list
I tried the following (but it does not work):
deb https://get.docker.io/ubuntu docker main
Noticed that:
I use Debian 10
The following command print "buster" : https://download.docker.com/linux/debian
Should I change to something like, without corrupting/breaking my operating system?
deb https://download.docker.com/linux/debian docker buster
See Install Docker Engine on Debian. Use the following commands:
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo \
"deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" |\
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
The first command will download the gpg key, the second one will adjust your docker.list file.
Then run sudo apt update
Create the following file:
$ cat /etc/apt/sources.list.d/docker-ce.list
deb [arch=amd64] https://download.docker.com/linux/debian buster stable
Then remove any other download.docker.com entries in /etc/apt/sources.list or /etc/apt/sources.list.d/*
I had a similar issue on a VM once. The repo for "https://download.docker.com/linux/ubuntu docker" does not exist and needs to be removed. Unsure why it's there.
This worked for me:
open the source list (providing there isn't external source lists):
sudo nano /etc/apt/sources.list
remove any lines for "ubuntu" as you are on Debian 10 and save
run sudo apt-get update
Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 months ago.
The community reviewed whether to reopen this question 5 months ago and left it closed:
Original close reason(s) were not resolved
Improve this question
I am following the docker installation on Ubuntu 20.04 using https://docs.docker.com/engine/install/ubuntu/ in Ubuntu VM on VMware.
But when running the command to add the repository to Ubuntu.
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
I am getting below error
Get:1 http://us.archive.ubuntu.com/ubuntu focal InRelease [265 kB]
Ign:2 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:3 http://dl.google.com/linux/chrome/deb stable Release
Hit:5 http://security.ubuntu.com/ubuntu focal-security InRelease
Ign:6 https://download.docker.com/linux/ubuntu focal InRelease
Err:7 https://download.docker.com/linux/ubuntu focal Release
404 Not Found [IP: 13.225.7.126 443]
Get:8 http://us.archive.ubuntu.com/ubuntu focal-updates InRelease [89.1 kB]
Hit:9 http://us.archive.ubuntu.com/ubuntu focal-backports InRelease
Reading package lists... Done
E: The repository 'https://download.docker.com/linux/ubuntu focal 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.
when running command
sudo apt-get install docker-ce docker-ce-cli containerd.io
I get error
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package docker-ce 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
E: Package 'docker-ce' has no installation candidate
E: Unable to locate package docker-ce-cli
E: Unable to locate package containerd.io
E: Couldn't find any package by glob 'containerd.io'
E: Couldn't find any package by regex 'containerd.io'
What is the reason for this?
I am new to docker.
Is there a workaround to this or should I install docker using source code or something?
Thank you.
For the moment, you can use :
sudo apt-get install -y docker.io
And then check with :
docker -v
According to the documentation followed by a test on my PC, these instructions will install docker successfully on WMware Ubuntu focal:
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl gnupg
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
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
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
Docker has not released the repository for focal fossa (20.04) yet. As #Wared said, running
sudo apt install -y docker.io
will get docker from ubuntu repository.
I am able to use all my docker images that I used to in 18.04 successfully on 20.04 with this docker installation.
I know the question is about Ubuntu 20. But in case you are trying to install it on Linux Mint 20 (like me), the problem looks the same but the answer is different.
The installation guide tells you to add the PPA like this:
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
However, the $(lsb_release -cs) part is the problem, because it passes the release name as a parameter to the repository command. In Ubuntu 20 that command outputs focal and everything goes well, but in Linux Mint that command outputs ulyana and it fails because docker does not have that release.
If you want to install it on mint, just replace that command with the focal string so you get the ubuntu focal version:
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
focal \
stable"
According to the information at https://docs.docker.com/engine/install/ubuntu/ Ubuntu 20.04 is not supported at the moment.
The docker repositories for Ubuntu 20.04 LTS arent ready yet (I dont understand why they didnt concentrate on that instead of getting out a version for non LTS releases like 19.10!).
But the version that is already available in the Ubuntu Universe repository is recent, so just use this in the meantime.
When the guys at Docker are ready to publish their 20.04 repo, just follow this instruction: https://docs.docker.com/engine/install/ubuntu/
..then, of course also including the section "Uninstalling old versions". This way, you can already start to use Docker on Ubuntu 20.04
The above error occurs due to unclean copy of the commands. Please consider this and copy the command once again to resolve the error. It helped me rectify the same error.
This is what solved my problem:
dpkg -i --ignore-depends=docker-ce lando-stable.deb
FROM https://docs.lando.dev/getting-started/installation.html#caveats
I am trying to set up Scrapy docker env on my local by running this command
docker build -t scrapy .
I am getting below error
Get:20 http://archive.ubuntu.com/ubuntu precise Release [49.6 kB]
Get:21 http://archive.ubuntu.com/ubuntu bionic-backports/universe amd64 Packages [2975 B]
Get:22 http://archive.ubuntu.com/ubuntu precise Release.gpg [198 B]
Ign:22 http://archive.ubuntu.com/ubuntu precise Release.gpg
Reading package lists...
W: GPG error: http://archive.ubuntu.com/ubuntu precise Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5
E: The repository 'http://archive.ubuntu.com/ubuntu precise Release' is not signed.
The command '/bin/sh -c apt-get update' returned a non-zero code: 100
My Docker file looks like this
############################################################
# Dockerfile for a Scrapy development environment
# Based on Ubuntu Image
############################################################
FROM ubuntu
MAINTAINER NeuralFoundry <neuralfoundry.com>
RUN echo deb http://archive.ubuntu.com/ubuntu precise universe >> /etc/apt/sources.list
RUN apt-get update
## Python Family
RUN apt-get install -qy python python-dev python-distribute python-pip ipython
## Selenium
RUN apt-get install -qy firefox xvfb
RUN pip install selenium pyvirtualdisplay
## AWS Python SDK
RUN pip install boto3
## Scraping
RUN pip install beautifulsoup4 requests
RUN apt-get install -qy libffi-dev libxml2-dev libxslt-dev lib32z1-dev libssl-dev
## Scrapy
RUN pip install lxml scrapy scrapyjs
Any help would be appreciated. TIA
Your Dockerfile has an unqualified reference to FROM ubuntu. That will resolve to ubuntu:latest, which is currently the same as ubuntu:18.04. Ubuntu 18.04 is codenamed Bionic Beaver. Precise Penguin was 12.04. You're trying to point to a Precise Penguin repository from your Bionic Beaver ubuntu installation: RUN echo deb http://archive.ubuntu.com/ubuntu precise universe >> /etc/apt/sources.list.
It's breaking, presumably, because Ubuntu 18.04 doesn't have a key to verify the signature of the 12.04 repository. You should be consistent with your version throughout the image. Unfortunately, the oldest Docker image available looks like it's 14.04 (trusty). Is there a reason you wanted the precise repository specifically, or could you use a more modern version? Nothing jumps out at me from your Dockerfile as something that would break in 18.04. Pick the version you want and fix your FROM line to be FROM ubuntu:14.04 (or higher). Then remove that RUN echo deb ... line (assuming you don't acutally need the precise repository).
For some reason, I've been unable to complete a docker build without the process stopping and no error being provided. I've googled around, and no-one appears to have the same issue.
The first (and salient) part of the Dockerfile config I'm using:
FROM java:8-jre
ENV DEBIAN_FRONTEND noninteractive
# Install needed packages
RUN apt-get update
RUN apt-get install -y \
cron
The command I'm using to execute the build (build.cmd):
#ECHO OFF
docker --debug --log-level debug build . ^
--build-arg http_proxy=%http_proxy% ^
--build-arg https_proxy=%https_proxy% ^
--build-arg no_proxy=%no_proxy% ^
--tag "bravura/jfrog-mission-control:latest" ^
%*
The result of running it:
Sending build context to Docker daemon 133.9MB
Step 1/7 : FROM java:8-jre
---> e44d62cf8862
Step 2/7 : ENV DEBIAN_FRONTEND noninteractive
---> Using cache
---> f30e6ab20920
Step 3/7 : RUN apt-get update
---> Running in 677bd445e48c
Get:1 http://security.debian.org jessie/updates InRelease [63.1 kB]
Get:2 http://security.debian.org jessie/updates/main amd64 Packages [508 kB]
Ign http://deb.debian.org jessie InRelease
Get:3 http://deb.debian.org jessie-updates InRelease [145 kB]
Get:4 http://deb.debian.org jessie-backports InRelease [166 kB]
Get:5 http://deb.debian.org jessie Release.gpg [2373 B]
Get:6 http://deb.debian.org jessie Release [148 kB]
Get:7 http://deb.debian.org jessie-updates/main amd64 Packages [17.6 kB]
Get:8 http://deb.debian.org jessie-backports/main amd64 Packages [1150 kB]
Get:9 http://deb.debian.org jessie/main amd64 Packages [9065 kB]
Fetched 11.3 MB in 6s (1829 kB/s)
Reading package lists...
SECURITY WARNING: You are building a Docker image from Windows against a non-Windows Docker host. All files and directories added to build context will have '-rwxr-xr-x' permissions. It is recommended to double check and reset permissions for sensitive files and directories.
Here's the big one: Running the same set of commands in a shell brought up by running docker run -it --rm java:8-jre /bin/bash works perfectly fine.
The other interesting bit: Concatenating the two commands together (with &&) defers the exit to the end of both executions. In fact, no errors are actually produced, so appending additional commands to the end works just fine (e.g. apt-get update && apt-get install -y cron && echo "Done!")
Any help even identifying where the issue could be reported would be greatly appreciated.
Update: As is the way with these things, I thought to look in the service logs as soon as I posted this. Found the following tidbits that might point me in the right direction:
[13:50:31.818][ApiProxy ][Info ] error copying response body from Docker: unexpected EOF
[13:50:31.818][ApiProxy ][Info ] error closing response body from Docker: unexpected EOF
Still no real idea what it means, however. Might just be another symptom rather than a cause.
Update: Just ran the build again to double-check the submitted responses, and without changes to my Dockerfile, everything is now working beautifully. One possible option is that the issue was silently fixed in the last update (which I installed today). I don't really have time to revert and re-test, so this is it until I run into the issue again, or someone else gets the same thing.
unexpected EOF (end of file). it seems you forgot the "\" at the end of your RUN command.
RUN apt-get update && apt-get install -y cron && echo "Done!" \
or
RUN apt-get update && \
apt-get install -y cron && \
echo "Done!" \
#Tzrlk are you working behind the corporate proxy? Try running this command directly in your terminal first and then use the docker build command and see.
export http_proxy=http://your proxy here:port here
export https_proxy=http://your proxy here:port here