Docker-engine confilcts with docker.io - docker

OS: Ubuntu 16.04
Docker version: 1.11.2
I have already installed docker 1.11.2 on my Ubuntu and I want to upgrade it to 1.12. All the steps are as follows:
I download the deb pkg named docker-engine_1.12.3-0~xenial_amd64.
Execute command: dpkg -i docker-engine_1.12.3-0~xenial_amd64 but notes with errors:
docker-engine conficts with docker.io.docker.io (version 1.11.2-0ubuntu5~16.04) has already been installed .
So I have to remove docker first by using commands as below:
service docker stop
apt-get remove docker
apt-get remove --auto-remove docker
rm -rf /var/lib/docker
Go to step 2, but with the same errors.
So, I hope someone would help me solve this problem.

The conflicting packages (which fight over the same binary) are docker.io (from the distribution) and docker-engine (from Docker itself).
Your command above does apt-get remove ... docker. Which achieve nothing for the aforementioned problem.
I have different machines running 16.04 and some use docker.io (easier, no extra repo) whereas others use docker-engine. I am indifferent. Pick on, docker should work just fine.

Firstly restart the ubuntu server with linux command(sudo shutdown -r now), and run the command : apt-get -f install(this command is suggested by the error information), then I install the docker-engine by the following site(https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-16-04).

Related

nvidia-docker with nvidia-cuda-toolkit not working between different hosts

I have two machines with different OS. One is ubuntu 18.04 and the other is debian buster. Both of them have docker installations ( from here ) and and the latest nvidia-docker installed. Both systems have a gpu which I want to use inside the containers. So I created a dockerfile which will install everything I require.
FROM ubuntu:18.04
RUN apt update -y
RUN apt upgrade -y
RUN apt install \
nvidia-cuda-toolkit \
-y
In the first machine which has as host ubuntu and a gpu that require .435 driver to work it works fine (docker run --rm --gpus all my-image:1 nvidia-smi)
But when I try the same dockerfile with 0 changes on my Debian machine it will return missmatched version of drivers.
The second matching which has as a host debian and a gpu that require .418 dirver to work it complains about missmatched versions.
Isn't supposed to be host independent installation ? What am I missing and I cannot build the same Dockerfile in both systems?
I can see toolkit bringing drivers on its own but as it is apt installation I have no control over it.
Thank you in advance

Installed docker and I got podman

Installed docker on Centos (running using VirtualBox) following steps below:
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
sudo yum install docker
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
And I rebooted my virtual machine, and as I type 'docker --version, I get below:
"Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg. podman version 1.0.5"
Can anybody explain what is going on in my machine?
#swxraft if you run the commands in the order posted in your question
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
sudo yum install docker
sudo yum-config-manager --add-repo
https://download.docker.com/linux/centos/docker-ce.repo
you installed a docker in the REHL repo (probably an alias to podman). And then loaded the repo for the oficial docker but never installed from there.
Extra info:
A) installation docker
How to install docker: follow this link [1] instead #govinda-malavipathirana. Latest docker-ce needs a newer containerd.io but REHL is excluding the ones in the docker repo. So you need to install docker -ce with --nobest (see instructions and error in link). Also you need to disable the firewall.d to have DNS in docker.
B) why docker is not in REHL8
Docker cli and daemon are not supported by REHL8 and its derivatives and it is "blocked" in several ways. Why is not suported -> monolitic and old [2]
Docker images ARE supported using podman. The images created with docker work with podman and viceversa. Also podman commands are the same as docker client.
Podman is a substitute of docker (but it does not use a daemon). They recommend to add a symlink docker -> podman and you will not notice the difference [3]
[1]https://linuxconfig.org/how-to-install-docker-in-rhel-8
[2]http://crunchtools.com/why-no-docker/
[3]https://developers.redhat.com/blog/2019/02/21/podman-and-buildah-for-docker-users/
Docker will not support RedHat 8, it will be installed as Podman.
So you can try it with Amazon linux2 instead of RedHat.
You have to create a new instance in AWS with Amazon linux2, then it will work.
Since docker is not officially supported by REHL8/CentOS8. You have to install it by additional steps.
This is a good article I have found in the internet, shows how to install docker in CentOS 8.
https://computingforgeeks.com/install-docker-and-docker-compose-on-rhel-8-centos-8

Docker still show the version after after its purge

After several problems, I decided to purge Docker to reinstall it in a second time. Here's the steps that I did to purge all the packages related to Docker:
- dpkg -l | grep -i docker
- sudo apt-get purge docker-engine docker docker-compose
- sudo apt-get autoremove --purge docker docker-compose docker-engin
I even delete the folder which contains Docker files and containters /var/lib/docker
But I still display the docker version after all I did.
docker -v
Docker version 17.06.2-ce, build a04f55b
EDIT : This solution is for systems using Debian packages (Debian, Ubuntu, Mint, ...).
You saw that the docker binary is still present in your system.
You can locate it using the whereis command :
# whereis docker
docker: /usr/bin/docker /usr/lib/docker /etc/docker /usr/share/man/man1/docker.1.gz
Now that the binary is located (it's /usr/bin/docker in the example) you can use the dpkg -S <location> to look for its package. See related post.
# dpkg -S /usr/bin/docker
docker-ce: /usr/bin/docker
And then you can get rid of the package (here docker-ce) using your usual tools (apt-get purge, or dpkg -r if the package was not installed through a repository).
That version number looks like the last release of the snap package. If you installed by snap, then the uninstall uses the same tool:
sudo snap remove docker

Docker - Bash: IP: command not found

I'm currently trying to set up a hyperledger fabric network using docker toolbox, based on the guide HERE
When it comes to "Starting up validating peers" step, I followed and entered ip add into the terminal, but it returns bash: ip: command not found. Any solution? I've tried ifconfig as well and it's the same issue, command not found.
Using Docker Toolbox on Windows 10 Home
Install ip command package for Ubuntu.
apt update
apt install iproute2
I have tried hostname -I. Working fine for me.No need to install a new package.
Unfortunately, your link has been broken (or it might be inaccessible from Iran). Although there is not enough evidence of which Linux OS you are trying to use, a solution is provided as follow work under .deb (e.g. Ubuntu) and .rpm (e.g. Fedora) package managers.
At first, update the container's repository:
Ubuntu:
apt-get update
CentOS:
yum update
Fedora:
dnf update
Secondly, install net-tools package.
Ubuntu:
apt-get install net-tools
CentOS:
yum install net-tools
Fedora:
dnf install net-tools
Lately, ifconfig has been replaced with ip command. So make sure to check both commands, some Linux distributions have not changed the command yet.
for command ip not found in centos 7, you can use yum install iproute -y to fix.
for command ifconfig not found in centos 7, you can use yum install net-tools -y to fix.
Although OP was on Windows 10. I landed on this question searching for a fix for macOS and didn't find this answer for a while. So I'm linking it here as well just in case
You can install ip tool on OS X via brew:
brew install iproute2mac
Your link doesn't work.
Do docker ps or docker images in GitBash to see if the docker containers and images are running.
I recommend installing Docker Community Edition if you are running Win 10. Make sure u have Hyper-V enabled.

yum install error docker

CentOS version: lsb_release -d
Description: CentOS release 6.5 (Final)
My repo looks like this
cat /etc/yum.repos.d/docker.repo
[dockerrepo]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/centos/$releasever/
enabled=1
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg
I have some old version of docker and when I try to install it, I get an error. When I try the skip option, even after that the docker service does not even exist on my centos yum install docker-engine has the following problem
Processing Conflict: docker-engine-1.7.1-1.el6.x86_64 conflicts docker-io
--> Finished Dependency Resolution
Error: docker-engine conflicts with docker-io-0.6.2-1.el6.x86_64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest"
Then service docker start does not exist when I try to start it.
How do I do clean of all docker stuff and do this from scratch?
Docker's official release no longer supports RHEL/Centos 6. I think that stopped with 1.7.1 and the official release is at 1.10. I would suggest updating to Centos 7 or anything with a 3.10+ kernel to use the latest docker-engine as it has improved quite a bit.
If you are stuck with Centos 6.5 then either continue with the the EPEL docker-io package or install the 1.7.1 rpm.
Completely remove the Centos 6 package
yum remove docker-io
Remove all docker data (and never get it back!)
rm -rf /var/lib/docker
Remove the Docker repo config
rm /etc/yum.repos.d/docker.repo
Either install docker-io again
yum install docker-io
Or install the docker-engine-1.7.1 rpm
yum install http://yum.dockerproject.org/repo/main/centos/6/Packages/docker-engine-1.7.1-1.el6.x86_64.rpm
Start it and docker
service docker start
docker run hello-world

Resources