How to install docker 1.9+ in CentOS 6.5?
CentOS 6 and RHEL 6 are no longer supported, and the last build for them is docker 1.7.1.
That page of the documentation (https://docs.docker.com/engine/installation/centos/) also mentions;
Docker runs on CentOS 7.X
Docker requires a 64-bit installation regardless of your CentOS version. Also, your kernel must be 3.10 at minimum, which CentOS 7 runs.
The kernel that those distro's are running on (2.6.x) is over 13 years old, and although newer features are back-ported to them by Red Hat, they lack certain options that are required by Docker, and have proven to be unstable, and unsuitable for production.
I encourage you to upgrade upgrade to CentOS 7.x if you want to (keep) using Docker.
Options to use latest docker on centos 6?
You can try to use a static binary to run docker, but this is all at your own risk; CentOS 6 runs on kernel 2.6, which is 13 years old now. That kernel misses various things needed to run Docker (e.g. Overlay networking is not supported), and is known for having some issues.
Note that running docker-in-docker may get you around "installing" docker 1.10, but will still run on the same kernel, so you'll end up with the same issues
Install docker on RedHatLinux 6.7
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 dockerAdd 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.repoAdd 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/gpgSwitch 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
How to install docker specific version
Got the answer from this github issue comment
.
Summary of above commit:-
echo deb http://get.docker.com/ubuntu docker main > /etc/apt/sources.list.d/docker.list
apt-key adv --keyserver pgp.mit.edu --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
apt-get update
apt-get install -y lxc-docker-1.3.3
If permission issue then use sudo
as:
echo deb http://get.docker.com/ubuntu docker main | sudo tee /etc/apt/sources.list.d/docker.list
sudo apt-key adv --keyserver pgp.mit.edu --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
sudo apt-get update
sudo apt-get install -y lxc-docker-1.3.3
Bonus Tip:
Don't know which version? Then hit Tab
after lxc-docker-
as:
sudo apt-get install -y lxc-docker-<Hit Tab here>
to see list of available docker versions.
How to install docker-compose on Linux RHEL 6.6?
RHEL 6 is not recommended and not supported for Docker use.
There was many addition made to recent version of Linux kernels that allows Docker, but they are missing on RHEL 6 because it is designed to be an enterprise system with very long term support (10 years).
Simply put it is too old, and Red Hat themselves aren't porting Docker on it.
Docker upgrades failing due to conflicts
From this message:
docker-engine-selinux conflicts with docker-selinux
I suspect you previously had the Red Hat distributed version of Docker installed, which installs docker-selinux
. The official Docker packages also install a similar package (docker-engine-selinux
) and that conflicts with the package you already have installed.
The best approach would be to uninstall the existing docker version (including the docker-selinux
package), and then install docker-engine
, following the instructions in the documentation; https://docs.docker.com/engine/installation/linux/centos/
Is it possible to install scip on centos 6.5
Yes, it is possible to build SCIP on CentOS 6.5.
How to upgrade docker-compose to latest version
First, remove the old version:
If installed via apt-get
sudo apt-get remove docker-compose
If installed via curl
sudo rm /usr/local/bin/docker-compose
If installed via pip
pip uninstall docker-compose
Then find the newest version on the release page at GitHub or by curling the API and extracting the version from the response using grep
or jq
(thanks to dragon788, frbl, and Saber Hayati for these improvements):
# curl + grep
VERSION=$(curl --silent https://api.github.com/repos/docker/compose/releases/latest | grep -Po '"tag_name": "\K.*\d')
# curl + jq
VERSION=$(curl --silent https://api.github.com/repos/docker/compose/releases/latest | jq .name -r)
Finally, download to your favorite $PATH-accessible location and set permissions:
DESTINATION=/usr/local/bin/docker-compose
sudo curl -L https://github.com/docker/compose/releases/download/${VERSION}/docker-compose-$(uname -s)-$(uname -m) -o $DESTINATION
sudo chmod 755 $DESTINATION
Related Topics
Jenkins Running at Very High CPU Usage
How to Install Xclip on an Ec2 Instance
Put Command Output into String
Install Sqlite3 Dev and Other Packages in Centos
How to Create Ansible Playbook to Obtain Os Versions of The Remote Hosts
In Shell, Split a Portion of a String with Dot as Delimiter
Linux: Update Embedded Resource from Executable
How to Launch Linux Subshell for Ssh_Askpass to Work in Linux
List of Files Modified 1 Hour Before
What Are The Lowest Possible Permissions for Typo3
Installing Ffmpeg on Amazon Linux - Cpp, Gcc & Libstdc++ Dependancies
Need Explanation on Pri Standard Format Specifier for Ps - Possible Bug in Documentation
How to Log from a Non-Root Debian Linux Daemon
Initramfs Built into Custom Linux Kernel Is Not Running