docker/sshd/centos/README.md
2018-07-25 16:14:16 +08:00

25 lines
622 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# centos sshd 搭建
## 创建镜像
镜像构建源码请[参考](http://git.yangyufans.com/pub/docker/tree/master/sshd/centos)
进入相应的nginx版本执行以下命令
```bash
docker build -t ccr.ccs.tencentyun.com/yy-dk/centos-sshd:7.0 .
```
## 从远程仓库下载
```bash
docker pull ccr.ccs.tencentyun.com/yy-dk/centos-sshd:7.0
```
## 创建网络
```bash
docker network create -d bridge --subnet 172.10.0.0/24 --gateway 172.10.0.1 my_net
```
## 启动容器
```bash
docker run -d \
--network my_net \
--ip 172.10.0.4 \
--name centos-sshd \
ccr.ccs.tencentyun.com/yy-dk/centos-sshd:7.0
```