I tried to install Docker on Fedora 35 with the following commands:
sudo dnf -y install dnf-plugins-core
sudo dnf config-manager \
--add-repo \
https://download.docker.com/linux/fedora/docker-ce.repo
sudo dnf install docker-ce docker-ce-cli containerd.io
But, I got the 404 error for the repository:
errors during downloading metadata for repository ‘docker-ce-stable’:
Status code: 404 for https://download.docker.com/linux/fedora/35/x86_64/stable/repodata/repomd.xml (IP: 13.227.108.44)
Error: Falha ao baixar os metadados do repo. ‘docker-ce-stable’: Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
Does anyone know how to solve this?
Someone on the official Fedora Forum managed to resolve it. So I'll put his answer here (https://ask.fedoraproject.org/t/error-on-install-docker-in-fedora-35/17165):
That’s because docker have not yet made a repository for Fedora 35. So for the time being, you’ll have to use their F34 packages. You’ll need to tweak your /etc/yum.repos.d/docker-ce.repo file to replace $releasever (which on Fedora 35 is 35) with 34.
So, it’ll look like this:
[docker-ce-stable]
name=Docker CE Stable - $basearch
baseurl=https://download.docker.com/linux/fedora/34/$basearch/stable
enabled=1
gpgcheck=1
gpgkey=https://download.docker.com/linux/fedora/gpg
...
I check from time to time to see if docker have made a repo from F35 yet. When that happens, we’ll need to undo this change.
did you tried these ?
sudo dnf -y install dnf-plugins-core
sudo dnf config-manager \
--add-repo \
https://download.docker.com/linux/fedora/docker-ce.repo
sudo dnf install docker-ce docker-ce-cli containerd.io
Related
This is my Dockerfile:
FROM base_company_repo
USER root
ENV http_proxy=proxy
ENV https_proxy=proxy
ENV no_proxy=proxy
COPY ./yum.conf /etc/yum.conf
RUN yum install -y yum-utils
RUN yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
RUN yum install docker-ce docker-ce-cli containerd.io
In my yum.conf I only added a timeout=300 parameter.
Building the image results in the following error and is cause by RUN yum install -y yum-utils:
https://some_path_to_my_company/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
Do i need credentials like described here: https://docs.fedoraproject.org/en-US/Fedora_Core/5/html/Software_Management_Guide/sn-yum-proxy-server.html ? I ask, because I do not have any and I wonder why I should need them.
I have also found a link to a redhat page, where I do not have access to: https://access.redhat.com/articles/1320623
Did anyone else have this problem and found a solution how to overcome that?
i followed below steps on centos 7 machine to install docker but it says nothing to do and when i run docker command it says that command not found.
i followed below steps on centos 7 machine to install docker but it says nothing to do and when i run docker command it says that command not found.
**sudo yum check-update
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo yum install docker**
on some other machine same commands worked but its having some strange behaviour on this machine.
running following steps solved the issue:
some how firewall started creating problem , so i had to check
the internet connection as below:
curl --location-trusted --ntlm --user "xyz" www.google.com enter password
yum install http://mirror.centos.org/centos/7/extras/x86_64/Packages/container-selinux-2.107-3.el7.noarch.rpm
yum -y install docker-ce
I am executing the next command:
docker login
And the result that I get is:
Error saving credentials: error storing credentials - err: exit status 1, out:
`Cannot autolaunch D-Bus without X11 $DISPLAY`
I am using an instance in Oracle Cloud that is:
Canonical-Ubuntu-16.04-2018.06.18-0
I tried fix it tipping the next command:
sudo apt-get install xorg openbox
Any idea about what is happening here??
This tip works for me (Ubuntu 18.04):
sudo apt update
sudo apt -V install gnupg2 pass
for me helped this comment
https://github.com/docker/compose/issues/6023
don't do apt install docker-compose and if you did, remove it and its
dependencies
sudo apt remove docker-compose -y && sudo apt autoremove
Today i had the same issue after installing docker.io and docker-compose on a fresh ubuntu.
After reading the link posted by Ryabchenko Alexander i tried the command he posted.
I then found out, if you remove docker-compose and reinstalling it, everything started to work like expected.
So my solution to overcome this issue in Ubuntu 18.04:
sudo apt remove docker-compose -y && sudo apt autoremove
sudo apt install docker-compose -y
Please check out the answer of Ryabchenko Alexander for the link and reasons why this issue exist.
Fixed, it was a problem that dinstalling docker-compose some libraries were removed
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
docker-ce
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/33,8 MB of archives.
After this operation, 181 MB of additional disk space will be used.
(
Reading database ... 129600 files and directories currently installed.)
Preparing to unpack .../docker-ce_18.03.1~ce-0~ubuntu_amd64.deb ...
Unpacking docker-ce (18.03.1~ce-0~ubuntu) ...
dpkg: error processing archive /var/cache/apt/archives/docker-ce_18.03.1~ce-0~ubuntu_amd64.deb (--unpack):
trying to overwrite '/usr/bin/docker-containerd', which is also in package docker-containerd 0.2.3+git+docker1.13.1~ds1-1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/docker-ce_18.03.1~ce-0~ubuntu_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
I got this error when trying to install the latest Docker (v20.10.17) on Ubuntu Focal 20.04 (LTS) following the official documentation. I tried installing older versions and got the same error. When running sudo dockerd --debug it showed the real error:
failed to start daemon: Devices cgroup isn't mounted
Cgroupfs (Control Groups) are a kernel mechanism for tracking and imposing limits on resource usage on groups of tasks. So the solution is to mount it. Note that you need to stop the container daemon before mounting the cgroup and then start it again after that.
Stop daemon
sudo systemctl stop containerd
Unmount (just in case) and then mount the cgroup
sudo cgroupfs-umount
sudo cgroupfs-mount
Start the daemon again
sudo systemctl start containerd
sudo systemctl start docker.service
sudo systemctl start docker.socket
If there are errors still, re-install everything
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin
Test that Docker works
sudo docker run hello-world
I don't see 18.04 listed on the supported list so you may be encountering compatibility issues that the developers have not had time to resolve. To work around your immediate issue, I would uninstall "docker-containerd" and any other dependent packages since that appears to be based on a very old version of docker (1.13).
apt remove docker-containerd
Step 01 - Uninstall old version of Docker
$ sudo apt-get remove docker docker-engine docker.io containerd runc
$ sudo rm -rf /var/lib/docker
$ sudo apt-get autoclean
$ sudo apt-get update
Step 02 - Install Docker-ce:
Install a few prerequisite packages which let APT use packages over HTTPS:
$ sudo apt install apt-transport-https ca-certificates curl software-properties-common
Add the GPG key for the official Docker repository to system:
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
Add the Docker repository to APT source:
$ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
Update the package database
$ sudo apt update
Make sure you are about to install from the Docker repo instead of the default Ubuntu repo
$ apt-cache policy docker-ce
Finally, install Docker:
$ sudo apt install docker-ce
Verify docker is running
$ sudo systemctl status docker
I am trying to build a docker container based on amazonlinux which is sort of centos.
One of the packages I need is supervisor and it is not available on the official repos so I have to do it with easy_install or pip.
The problem is that, although I tried installing python-setuptools and python-pip, then when I try to do:
RUN easy_install supervisor
or
RUN pip install supervisor
It says the command doesn't exists
/bin/sh: easy_install: command not found
The command '/bin/sh -c easy_install supervisor' returned a non-zero code: 127
I tried with full path, but same result, and I see other dockerfiles people doing it like that on centos images.
After a while, I found the reason.
By default, yum was installing python26 and the easy_install script runs with python27, so I had to be calling easy_install-2.6 or install the python27 package
Not familiar with AWS's specific image, but for a general centos image, you'll need to install pip or easy_install with a yum command first, which requires the epel repository:
RUN yum -y install epel-release \
&& yum -y install python-pip python-setuptools \
&& yum clean all
Python documented the process in detail on their page here: https://packaging.python.org/install_requirements_linux/
There's also some documentation on this over at superuser: https://superuser.com/q/877759/587488