栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

Docker 安装Ubuntu

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Docker 安装Ubuntu

1. 拉取镜像

docker pull ubuntu

2. 启动容器

docker run --name ubuntu -it -d -p 8088:80 ubuntu

3. 登入容器

docker exec -it ubuntu bash
# 使用Windows git bash
winpty docker exec -it ubuntu bash

4. 更新资源

apt-get update
apt-get upgrade

5. 设置root密码

passwd 

6. 安装软件

apt-get install vim
apt-get install openssh-server

7. 编辑配置文件:
 

#PermitRootLogin prohibit-password 默认是注释的
#添加配置
PermitRootLogin yes

# 重启ssh
/etc/init.d/ssh restart

# 本机测试链接
ssh root@0.0.0.0

 

 

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/603680.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号