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
For historical reasons, MySQL replication is base...
1.vue packaging Here we use the vue native packag...
Suppose Taobao encourages people to shop during D...
Yum (full name Yellow dog Updater, Modified) is a...
Table of contents Preface Implementation ideas Im...
1. Enter the command mysqld --skip-grant-tables (...
Recently, when I was learning Django, I needed to...
Hello everyone, I am Liang Xu. When using Linux, ...
The loading speed of a web page is an important in...
The frame and rules attributes of the table tag c...
Problem Description After installing the plugin E...
@Font-face basic introduction: @font-face is a CSS...
1. Command Introduction The contab (cron table) c...
Table of contents Constructing payment methods us...
After MySQL 5.7.18 is successfully installed, sin...