0%

Linux Ubuntu

1.安装apt-https

1
2
3
4
5
6
sudo apt-get update && \
sudo apt-get -y install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common

2添加PGP Key

官方库:

1
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

阿里云镜像:

1
curl -fsSL http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -

3.添加源

官方源:

1
2
3
4
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"

阿里云镜像:

1
2
3
4
sudo add-apt-repository \
"deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu \
$(lsb_release -cs) \
stable"

4.更新APT包索引

1
sudo apt-get update

5.安装docker引擎

1
sudo apt-get install docker-ce

6.添加用户至Docker用户组

  1. 创建docker组
    1
    sudo groupadd docker
  2. 将当前用户加入docker组:
    1
    sudo gpasswd -a ${USER} docker
  3. 刷新Docker成员:
    1
    newgrp - docker

7.配置Aliyun镜像

http://blog.csdn.net/qq_26091271/article/details/51501768

1
sudo vim /etc/docker/daemon.json
1
2
3
{
"registry-mirrors":["https://4p25zs3g.mirror.aliyuncs.com"]
}
1
sudo service docker restart

Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

Quick Start

Create a new post

1
$ hexo new "My New Post"

More info: Writing

Run server

1
$ hexo server

More info: Server

Generate static files

1
$ hexo generate

More info: Generating

Deploy to remote sites

1
$ hexo deploy

More info: Deployment