In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly shows you "CentOS6.5 how to create a Docker image that can be logged in by ssh", which is easy to understand and well-organized. I hope it can help you solve your doubts. Let me lead you to study and learn this article "CentOS6.5 how to make a Docker image that can be logged in by ssh".
Docker uses Series 1 to change the image source to Aliyun's to facilitate subsequent operations.
Execute this command and change the source address to Ali's:
Curl https://git.oschina.net/feedao/Docker_shell/raw/start/ali-centos.sh | sh
First install Docker:
Yum-y install docker-io
Second, start Docker:
Service docker start
Third, install the tools for making CentOS images:
Yum-y install febootstrap
Fourth, make CentOS image file centos6-image directory
Febootstrap-I bash-I wget-I yum-I iputils-I iproute-I man-I vim-minimal-I openssh-server-I openssh-clients centos6 centos6-image http://mirrors.aliyun.com/centos/6/os/x86_64/
The fifth is to make a Docker image, which is named centos6-base.
Cd centos6-image & & tar-c. | docker import-centos6-base
The sixth is to make a Docker image that can be logged in by ssh, whose name is centos6-ssh.
Docker build-t centos6-ssh https://git.oschina.net/feedao/Docker_shell/raw/start/Dockerfile
After the first six steps, a local docker image that can be logged in is made.
The user name is root and the password is 123456
Experience steps:
Create a container:
Docker run-d-p 127.0.0.1 purl 33301purl 22 centos6-ssh
Ssh login container:
Ssh root@127.0.0.1-p 33301
After entering the password, you can start messing around.
The above is all the contents of the article "how CentOS6.5 makes Docker images that can be logged in by ssh". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.