linux version
Linux version 2.6.32-220.el6.x86_64 (mockbuild@c6b18n3.bsys.dev.centos.org) (gcc version 4.4.6 20110731 (Red Hat 4.4.6-3)
9 回复
[root@localhost ~]# lsb_release -a
LSB Version: :core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: CentOS
Description: CentOS release 6.2 (Final)
Release: 6.2
Codename: Final
哦, 用docker倒是容易
下面的操作假设你已经切换到root用户.
第一步: 安装docker http://docs.docker.com/engine/installation/centos/
yum update
curl -sSL https://get.docker.com/ | sh
sudo service docker start
创建目录,下载nutzbook的docker-compose.xml
mkdir -p /data/nutzbook
cd /data/nutzbook
wget https://raw.githubusercontent.com/wendal/nutz-book-project/master/docker/docker-compose.yml
安装docker-compose
curl -L https://github.com/docker/compose/releases/download/1.5.1/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
可以启动了
docker-compose up
稍等几分钟, 通过8080端口即可访问
@qq_ec8eb7ab531d0b1e8cef055bd4d4c445 访问这目录干毛线
来自炫酷的 NutzCN
完蛋
有些依赖包 系统中装不上
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
重新安装了一个centos7虚拟机测试了一下, 很正常
[root@localhost ~]# curl -sSL https://get.docker.com/ | sh
+ sh -c 'sleep 3; yum -y -q install docker-engine'
warning: /var/cache/yum/x86_64/7/docker-main-repo/packages/docker-engine-selinux-1.9.0-1.el7.centos.noarch.rpm: Header V4 RSA/SHA512 Signature, key ID 2c52609d: NOKEY
Public key for docker-engine-selinux-1.9.0-1.el7.centos.noarch.rpm is not installed
Importing GPG key 0x2C52609D:
Userid : "Docker Release Tool (releasedocker) <docker@docker.com>"
Fingerprint: 5811 8e89 f3a9 1289 7c07 0adb f762 2157 2c52 609d
From : https://yum.dockerproject.org/gpg
If you would like to use Docker as a non-root user, you should now consider
adding your user to the "docker" group with something like:
sudo usermod -aG docker your-user
Remember that you will have to log out and back in for this to take effect!
[root@localhost ~]# service docker start
Redirecting to /bin/systemctl start docker.service
[root@localhost ~]# ps aux | grep docker
root 32064 0.6 1.1 442620 22428 ? Ssl 01:46 0:00 /usr/bin/docker daemon -H fd://
root 32172 0.0 0.0 112640 956 pts/0 S+ 01:47 0:00 grep --color=auto docker
[root@localhost nutzbook]# wget https://raw.githubusercontent.com/wendal/nutz-book-project/master/docker/docker-compose.yml
--2015-11-20 01:49:18-- https://raw.githubusercontent.com/wendal/nutz-book-project/master/docker/docker-compose.yml
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 199.27.79.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|199.27.79.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 443 [text/plain]
Saving to: ‘docker-compose.yml’
100%[===================================================================================================================================================>] 443 --.-K/s in 0s
2015-11-20 01:49:18 (88.2 MB/s) - ‘docker-compose.yml’ saved [443/443]
[root@localhost nutzbook]# docker-compose up
// 然后就是自动下载镜像,启动的一堆日志
说明一下,centos6就别折腾docker了
来自炫酷的 NutzCN
添加回复
请先登陆