docker安装Ubuntu+python3并运行在3000端口


1年前 674次点击 来自 其他

标签: Docker

docker image pull ubuntu
docker image ls
docker run -itd --name ubuntu_python -p 3000:22 --restart=always 镜像ID /bin/bash
docker exec -it 容器ID /bin/bash
apt update
apt install vim python3 openssh-server -y 
service ssh start && ps -e | grep ssh
vi /etc/ssh/sshd_config

修改允许root远程登录:

PermitRootLogin yes

Made with in Shangrao,China By Devler.

Copyright © Devler 2012 - 2022

赣ICP备19009883号-1