PyCharm configure Docker
Directly in pycharm: File->settting, and then create a new docker,
There is no need to change any configuration inside, it will automatically find all your containers
Then run it directly in the lower left corner
Finally, select the docker container you want to use in the interpreter.
How to access files in docker container
1. You can copy the files in docker, and then copy them back after processing. The specific operations are as follows:
1. How to download files from the docker container:
docker cp container_created:path
Where: is the path to be stored locally.
2. How to upload files from the local machine to the docker container
docker cp container_created:path
example:
docker ps
CONTAINER ID IMAGE COMMAND CREATED
STATUS PORTS NAMES
266f4acef99b reg.docker.alibaba-inc.com/alibase/alios7u2 "/sbin/init" 4 hours ago Up 4 hours
docker cp 266f4:/root/feedback_venv/feedback_venv.zip /Users/Downloads/
2. You can also enter the container and operate:
sudo docker exec -it container_created /bin/bash
su root authentication failed, solution
Solution
su root
Authentication failed because root is not initialized, initialization: open the terminal, enter
sudo passwd root
, then it will prompt "Re-enter the new UNIX password: "Enter the new password, and then
This problem can be solved by entering the password you entered last time.
chmod -R 777 /目标目录
-R
Indicates all subdirectories that contain settings
777
Indicates that the file is readable, writable and executable
Install Qtcreator under ubuntu system
1. Open the Ubuntu system and go to the Qt official website to download qt
https://download.qt.io/archive/qt/
After entering the website, find qt-opensource-linux-x64-5.12.2.run and start the download
2. The root account will not be enabled for the newly installed ubuntu system. Steps to enable root account
1. Use the command
sudo passwd root
Enter the current account password and the root account password that needs to be set 123456
2. Use
su root
Enter the root account, if # appears, it means success.
After the file is downloaded, it will be saved in the system download place by default. Open the terminal under the download, enter the terminal and su root
enter password to enter the root authority.
Enter the following command to get execute permission
chmod +x qt-opensource-linux-x64-5.12.2.run
Enter the command to run
./qt-opensource-linux-x64-5.12.2.run
Don't rush to open Qt creator after completion, you also need to install a series of packages
3. Open the terminal and enter
sudo apt-get update
sudo apt-get install gcc g++
sudo apt-get install build-essential
sudo apt-get install libgl1-mesa-dev
Select Yes during installation.
Configure environment variables, enter in the terminal
gedit /etc/bash.bashrc
add at the end of the file
export QTDIR=/opt/Qt5.12.2/5.12.2/gcc_64
export PATH=$QTDIR/bin:/opt/Qt5.12.2/Tools/QtCreator/bin:$PATH
export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
input the command
source /etc/profile
Make environment variables take effect. Type in the terminal
qtcreator
You can start Qt without entering /opt/Qt5.12.2/Tools/QtCreator/bin and executing the command ./qtcreator
To verify that the installation was successful, enter the command
qmake -version
If the following message appears, the installation is successful.
QMake version 3.1
Using Qt version 5.12.2 in /opt/Qt5.12.2/5.12.2/gcc_64/lib