Skip to content

Commit fda6a07

Browse files
committed
Minor update ignore file; Add pull_all and push_all scripts
1 parent f936efe commit fda6a07

File tree

6 files changed

+31
-5
lines changed

6 files changed

+31
-5
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
*.tmp
44
.idea/
55
_book/
6+
*.swp

_local/pull_all.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
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+

_local/push_all.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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+

dockerfile/instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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>`

repository/local_repo.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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
```

security/kernel_capability.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## 内核能力机制
22

33
能力机制(Capability)是 Linux 内核一个强大的特性,可以提供细粒度的权限访问控制。
4-
Linux 内核自 2.1 版本起就支持能力机制,它将权限划分为更加细粒度的操作能力,既可以作用在进程上,也可以作用在文件上。
4+
Linux 内核自 2.2 版本起就支持能力机制,它将权限划分为更加细粒度的操作能力,既可以作用在进程上,也可以作用在文件上。
55

66
例如,一个 Web 服务进程只需要绑定一个低于 1024 的端口的权限,并不需要 root 权限。那么它只需要被授权 `net_bind_service` 能力即可。此外,还有很多其他的类似能力来避免进程获取 root 权限。
77

0 commit comments

Comments
 (0)