docker nothing to do, and docker commnad not found - docker

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

Related

How to enable apt install in Bitnami containers?

I'm running a Bitnami/pytorch container and would like to install packages using apt. However I cannot do it as sudo is not installed. For example:
$ sudo apt install nano
bash: sudo: command not found
So what is the preferred way of getting apt install to work?

How to install Docker on Fedora 35?

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

Docker - SFTP installation

I am trying for installing SFTP in the Docker container.
I have the following in my Dockerfile. Able to install ntp this way, but failing for sftp. May I know the command?
RUN yum install -y ntp \
&& yum install -y sftp
You should add more information such as:
Linux version (if your container is a Redhat, CentOS, version...)
Command you've executed to build / run.
Error message.
Anyway, you can try with this while we wait for your additional info:
RUN yum install -y ntp \
&& yum install -y vsftpd

Error Starting Docker Daemon on CentOS 7

Seems like I can't start the Docker service for the first time using systemctl start docker. I keep running into this exact error below:
Error starting daemon: couldn't create plugin manager: error setting plugin manager root to private: permission denied
My docker installation steps on my CentOS 7(64x) machine:
yum install -y yum-utils \
device-mapper-persistent-data \
lvm2
yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
yum install docker-ce
systemctl start docker
Yes, the provided commands were run as root.

Trying to execute easy_install or pip on docker build says command not found

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

Resources