启动一个Ubuntu 容器 (常用语行容器构建时安装测试)
__ubuntu() {
docker rm -f ubuntu
docker pull registry.cn-hangzhou.aliyuncs.com/lwmacct/ubuntu:v3
docker run -itd --name=ubuntu \
--restart=always \
--privileged \
-v /proc:/host/:ro \
-v /data/docker-share/:/kuaicdn/share/ \
-v /data/docker-data/ubuntu/:/kuaicdn/data \
registry.cn-hangzhou.aliyuncs.com/lwmacct/ubuntu:v3
}
__ubuntu
docker exec -it ubuntu bash
Docker Ubuntu 启用ssh
设置运行root 用户登录
sed -i 's,^#PermitRootLogin.*$,PermitRootLogin yes,' /etc/ssh//sshd_config; \
启动 sshd
/etc/init.d/ssh start