File tree Expand file tree Collapse file tree 6 files changed +31
-5
lines changed Expand file tree Collapse file tree 6 files changed +31
-5
lines changed Original file line number Diff line number Diff line change 33* .tmp
44.idea /
55_book /
6+ * .swp
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ # This script will update all local images
4+ # See: https://github.com/yeasy/docker_practice/blob/master/_local/pull_all.sh
5+ # Usage: pull_all
6+ # Author: yeasy@github
7+ # Create: 2014-09-23
8+
9+ for image in ` sudo docker images| grep -v " REPOSITORY" | grep -v " <none>" | awk ' {print $1":"$2}' `
10+ do
11+ sudo docker pull $image
12+ done
13+
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ # This script will upload all local images to a registry server ($registry is the default value).
3+ # This script requires the push_images, which can be found at https://github.com/yeasy/docker_practice/blob/master/_local/push_images.sh
4+ # Usage: push_all
5+ # Author: yeasy@github
6+ # Create: 2014-09-23
7+
8+ for image in ` sudo docker images| grep -v " REPOSITORY" | grep -v " <none>" | awk ' {print $1":"$2}' `
9+ do
10+ push_images $image
11+ done
12+
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ ENV PATH /usr/local/postgres-$PG_MAJOR/bin:$PATH
4848格式为 ` ADD <src> <dest> ` 。
4949
5050该命令将复制指定的 ` <src> ` 到容器中的 ` <dest> ` 。
51- 其中 ` <src> ` 可以是Dockerfile所在目录的一个相对路径;也可以是一个 URL;还可以是一个 tar 文件(自动解压为目录)。则。
51+ 其中 ` <src> ` 可以是Dockerfile所在目录的一个相对路径;也可以是一个 URL;还可以是一个 tar 文件(自动解压为目录)。
5252
5353### COPY
5454格式为 ` COPY <src> <dest> ` 。
Original file line number Diff line number Diff line change @@ -51,10 +51,10 @@ $ sudo python-pip install docker-registry
5151```
5252$ sudo apt-get install build-essential python-dev libevent-dev python-pip libssl-dev liblzma-dev libffi-dev
5353$ git clone https://github.com/docker/docker-registry.git
54- $ cd git -registry
55- $ sudo pip install .
54+ $ cd docker -registry
55+ $ sudo python setup.py install
5656```
57- 然后修改配置文件,主要修改dev模板段的 `storage_path` 到本地的存储仓库的路径。
57+ 然后修改配置文件,主要修改 dev 模板段的 `storage_path` 到本地的存储仓库的路径。
5858```
5959$ cp config/config_sample.yml config/config.yml
6060```
Original file line number Diff line number Diff line change 11## 内核能力机制
22
33能力机制(Capability)是 Linux 内核一个强大的特性,可以提供细粒度的权限访问控制。
4- Linux 内核自 2.1 版本起就支持能力机制,它将权限划分为更加细粒度的操作能力,既可以作用在进程上,也可以作用在文件上。
4+ Linux 内核自 2.2 版本起就支持能力机制,它将权限划分为更加细粒度的操作能力,既可以作用在进程上,也可以作用在文件上。
55
66例如,一个 Web 服务进程只需要绑定一个低于 1024 的端口的权限,并不需要 root 权限。那么它只需要被授权 ` net_bind_service ` 能力即可。此外,还有很多其他的类似能力来避免进程获取 root 权限。
77
You can’t perform that action at this time.
0 commit comments