1. Use the following command to set the ssh password when making dockerfileRUN echo "root:root" | chpasswd 2. Now you need to change the root password in the container after the container is generatedThe docker exec -it centos7.5 root:newpassword | chpasswd command was executed successfully, but the password update failed. The correct way is as follows: PASS='newpassword ' && echo -e "KaTeX parse error: Expected 'EOF', got '\n' at position 5: PASS\̲n̲PASS" | docker exec -i centos7.5 Supplement: What is the password after docker pull centos? 【Xiaobaitiankeng】 For the record, the first time I used Baota's docker to pull centos8, when I started the centos8 container, I was prompted to enter a password. I was confused at the time. What was the password? After an hour of work, I finally figured out how to do it. I just ssh to my server and then run docker exec -it your container name/bin/bash This will take you directly into the new container. So where is the name of your container? See the picture below So, I directly execute docker exec -it funny_tesla /bin/bash You can enter the centos8 container and do whatever you want. . End~ The above is my personal experience. I hope it can give you a reference. I also hope that you will support 123WORDPRESS.COM. If there are any mistakes or incomplete considerations, please feel free to correct me. You may also be interested in:
|
<<: Summary of some common methods of JavaScript array
>>: The difference between html Frame, Iframe and Frameset
Table of contents Configuration nfs server (nfs.s...
Table of contents 1. Introduction to docker-maven...
Comprehensive understanding of html.css overflow ...
Putting input and img on the same line, the img ta...
This article shares the specific code of js to re...
Preface Slow query log is a very important functi...
Mac latest version of MySQL 8.0.22 password recov...
Solving the problem Bootstrap is a CSS framework ...
1. iframe definition and usage The iframe element...
A Docker container starts a single process when i...
Table of contents 1. First install echarts in the...
Flex Layout Flex is the abbreviation of Flexible ...
Recently, the server has been frequently cracked ...
Table of contents Preface 1. Startup management b...
There are many import methods on the Internet, an...