OCI runtime(container_linux.go:348) error in docker - docker

my Server is :
3.13.0-44-generic #73-Ubuntu SMP Tue Dec 16 00:22:43 UTC 2014
and my docker version is :
Docker version 18.06.3-ce, build d7080c1
I got this error after my simple code docker run hello-world why ?
docker: Error response from daemon: OCI runtime create failed:
container_linux.go:348: starting container process caused
"process_linux.go:297: copying bootstrap data to pipe caused \"write
init-p: broken pipe\"": unknown.

I find solution , and i want to share it, If you’re using Docker CE on Ubuntu, take Docker back one patch version (if you’re on Debian, replace debian for ubuntu):
$ sudo apt-get install docker-ce=18.06.1~ce~3-0~ubuntu
If you’re using Docker EE, you can downgrade with something like this:
$ sudo apt-get install docker-ee=18.09.1~ee-0~ubuntu
For Docker CE on CentOS 7 (Docker EE and/or Fedora are similar):
$ sudo curl -SsL https://download.docker.com/linux/centos/docker-ce.repo -o /etc/yum.repos.d/docker-ce.repo
$ sudo yum --showduplicates list docker-ce
$ sudo yum install docker-ce-18.06.1.ce-3-0.el7.centos

recently encountered similar problem
just updated the linux kernel from 3.x version to 4.x version
$ apt-get install --install-recommends linux-generic-lts-xenial
then try docker run commands
to know the current linux kernel version
$ uname -a

Related

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-engine confilcts with docker.io

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).

how to install docker in sles 12?

I want to install docker stable version in my suse system (version sles 12). For installing docker in suse system, need to add repository of docker.
I didn't found any url (repository url) for adding docker repository of version 1.6. I found docker version 1.12 but it is not working in my case. I removed docker repository now.
can anyone suggest me how I can add correct repository and install docker further in my system?
edit- sample commands and output
docker -v
Docker version 1.6.0, build 4749651
docker pull hello-world
FATA[0000] Cannot connect to the Docker daemon. Is 'docker -d' running on this host?
sudo docker pull hello-world
sudo: docker: command not found
You can use zypper to do that.
You have to adapt the repository url to your SUSE version. To find the correct package repository, please follow this link
https://software.opensuse.org/download.html?project=Virtualization%3Acontainers&package=docker
sudo zypper addrepo https://download.opensuse.org/repositories/Virtualization:containers/openSUSE_Leap_15.0/Virtualization:containers.repo
sudo zypper dist-upgrade
sudo zypper update
sudo zypper install docker
Source : https://w3blog.fr/en/2019/03/25/install-docker-open-source-on-linux-suse/
You will find Docker 1.6 at
https://get.docker.com/builds/Linux/x86_64/docker-1.6.0.tgz
The general doc for installing docker in Suse is available at
https://docs.docker.com/engine/installation/linux/SUSE/

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

Install docker on RedHatLinux 6.7

I am following the documentation https://docs.docker.com/engine/installation/rhel/ to install docker on RHEL 6.7.
When I run the command
sudo yum install docker-engine
I get the following error
Error: Package: docker-engine-1.9.1-1.el7.centos.x86_64 (dockerrepo)
Requires: libsystemd-journal.so.0(LIBSYSTEMD_JOURNAL_196)(64bit)
Error: Package: docker-engine-1.9.1-1.el7.centos.x86_64 (dockerrepo)
Requires: libsystemd-journal.so.0(LIBSYSTEMD_JOURNAL_195)(64bit)
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
As per the suggestion I tried to run the command
sudo yum install docker-engine --skip-broken
Here is the output
Packages skipped because of dependency problems:
audit-libs-python-2.3.7-5.el6.x86_64 from RHEL-67-x86_64
docker-engine-1.9.1-1.el7.centos.x86_64 from dockerrepo
docker-engine-selinux-1.9.1-1.el7.centos.noarch from dockerrepo
libsemanage-python-2.0.43-5.1.el6.x86_64 from RHEL-67-x86_64
policycoreutils-python-2.0.83-24.el6.x86_64 from RHEL-67-x86_64
setools-libs-3.3.7-4.el6.x86_64 from RHEL-67-x86_64
setools-libs-python-3.3.7-4.el6.x86_64 from RHEL-67-x86_64
How can I fix above problems and install docker on RHEL 6.7 ?
RHEL 6 is no longer supported by Docker, the latest version you can install is Docker 1.7. The installation instructions can be found here
Below steps do work for Docker to be installed on OEL 6.10 with a user having super user privileges.
Create a user with SUDO Access as suggested in Red-Hat Docs ([Link][1] speaks well on this process). For instance I created an user as docker with group as docker.
groupadd docker
useradd -m -g docker docker
Add docker repository for installing latest copy of Docker for RHEL/Centos 6
yum update -y
yum install epel-release
vi /etc/yum.repos.d/docker.repo
Add below contents to /etc/yum.repos.d/docker.repo
[docker-repo]
name=Docker Repo
baseurl=https://yum.dockerproject.org/repo/main/centos/6/
enabled=1
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg
Switch to "docker" user and execute below commands:
sudo yum install -y docker-engine
Post Installation start docker using below commands.
sudo chkconfig docker on
sudo service docker start
Starting cgconfig service: [ OK ]
Starting docker: [ OK ]
sudo service docker status
docker (pid 26925) is running...
ps -ef | grep docker
root 25590 14123 0 Jul27 ? 00:00:00 sshd: docker [priv]
docker 25594 25590 0 Jul27 ? 00:00:00 sshd: docker#pts/1
docker 25595 25594 0 Jul27 pts/1 00:00:00 -bash
root 26925 1 2 00:00 pts/1 00:00:00 /usr/bin/docker -d
docker 27106 25595 0 00:00 pts/1 00:00:00 ps -ef
docker 27107 25595 0 00:00 pts/1 00:00:00 grep docker
docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
[1]: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux_OpenStack_Platform/2/html/Getting_Started_Guide/ch02s03.html
You can install the last version of Docker by upgrading your Kernel to 3.10. At your own risk :)
Worked for me and pretty stable for weeks now.
Upgrading RHEL Kernel
For me was useful this link. I have an oracle server 6.10 and the steps are:
add epel packages: rpm -iUvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
update packages: yum update -y
Install docker: yum install docker-io -y
Start service: /etc/init.d/docker start
Configure service in start machine: chkconfig docker on

Resources