mirror of
https://github.com/yeasy/docker_practice.git
synced 2024-11-28 01:08:53 +00:00
Modify the usage of the bashrc file
This commit is contained in:
parent
7896cb5d7b
commit
e94bb1d13b
@ -54,9 +54,10 @@ $ sudo nsenter --target 10981 --mount --uts --ipc --net --pid
|
||||
root@243c32535da7:/#
|
||||
```
|
||||
更简单的,建议大家下载
|
||||
[bashrc_docker](https://github.com/yeasy/docker_practice/raw/master/_local/bashrc_docker),并将内容放到.bashrc中。
|
||||
[.bashrc_docker](https://github.com/yeasy/docker_practice/raw/master/_local/.bashrc_docker),并将内容放到.bashrc中。
|
||||
```
|
||||
$ wget https://github.com/yeasy/docker_practice/raw/master/_local/bashrc_docker; cat bashrc_docker >> ~/.bashrc; source ~/.bashrc
|
||||
$ wget -P ~ https://github.com/yeasy/docker_practice/raw/master/_local/.bashrc_docker;
|
||||
$ echo "[ -f ~/.bashrc_docker ] && . .bashrc_docker" >> ~/.bashrc; source ~/.bashrc
|
||||
```
|
||||
这个文件中定义了很多方便使用Docker的命令,例如`docker-pid`可以获取某个容器的PID;而`docker-enter`可以进入容器或直接在容器内执行命令。
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user