Skip to content

Instantly share code, notes, and snippets.

@tkhduracell
Last active November 21, 2016 13:48
Show Gist options
  • Save tkhduracell/5064f4f6a3d5084eb682 to your computer and use it in GitHub Desktop.
Save tkhduracell/5064f4f6a3d5084eb682 to your computer and use it in GitHub Desktop.
Install docker in VPSnet OpenKZ
# Install ubuntu
apt-get update
apt-get upgrade
apt-get install wget curl
wget -qO- https://get.docker.com/ | sh
# Install centOS 7 (VPSnet)
localedef -i en_US -f UTF-8 en_US.UTF-8
yum -y update
yum install epel-release
yum install docker-io
# Set permanent bridge
# Add --bridge="venet0" in /etc/sysconfig/docker
service docker restart
docker ps
# Install docker-compose
curl -L https://github.com/docker/compose/releases/download/1.1.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
# Test
docker run hello-world
@vvavepacket
Copy link

vvavepacket commented Nov 21, 2016

Hi, how do we actually put the bridge venet0 configuration?

Set permanent bridge

Add --bridge="venet0" in /etc/sysconfig/docker

I added the 'bridge="venet0"' in the file in the file above, but docker is giving me error when starting..

Nov 21 08:01:45 kr docker-current[9311]: time="2016-11-21T08:01:45.694911656-05:00" level=info msg="Firewalld running: true"
Nov 21 08:01:45 kr docker-current[9311]: time="2016-11-21T08:01:45.804527285-05:00" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address"
Nov 21 08:01:45 kr docker-current[9311]: time="2016-11-21T08:01:45.853599139-05:00" level=fatal msg="Error starting daemon: Error initializing network controller: Error creating default "bridge" network: package not installed"
Nov 21 08:01:45 kr systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Nov 21 08:01:45 kr systemd[1]: Failed to start Docker Application Container Engine.
Nov 21 08:01:45 kr systemd[1]: Unit docker.service entered failed state.
Nov 21 08:01:45 kr systemd[1]: docker.service failed.

My centos kernel is 2.6.32-042stab120.5
My docker is

Client:
Version: 1.10.3
API version: 1.22
Package version: docker-common-1.10.3-46.el7.centos.14.x86_64
Go version: go1.6.3
Git commit: cb079f6-unsupported
Built: Fri Sep 16 13:24:25 2016
OS/Arch: linux/amd64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment