

#Pycharm remote development code
5.3 function python_env, Start the container ssh service name='python_env'ĭocker run -d -name $name -p 2222:22 $image /run.sh 5.4 Into the container, You can view the code file to be synchronized later, And executing code inside the container docker exec -it python_env bash 6. project 5.2 Execute build docker build -t python_env.
#Pycharm remote development install
& pip3 install setuptools=33.1.1 -i -trusted-host \ĬOPY. & pip3 install -upgrade pip -i -trusted-host \ & tar -xvf Python-3.7.1.tar.xz -C /usr/local/ \ & yum install -y wget aclocal automake autoconf make gcc gcc-c++ python-devel mysql-devel bzip2 libffi-devel epel-release \ RUN cd / & ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \


5.1 To write Dockerfile # Using Centos for base image With support SSH The basic image of services centos:7-ssh after, Well, on the basis of this mirror image, structure python3 Execution environment, Provides debugging for remote environments. Build on support SSH service, Support execution python3 Image of environment python_env Warning: Permanently added ':2222' (RSA) to the list of known hosts. RSA key fingerprint is SHA256:Tx4eA0ymIH+W6uOiqdcdNAaEvpwgKlKqbd3uzlHGm+0. The authenticity of host ':2222 (:2222)' can't be established. docker_ssh_centos]# docker psĬONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMESĥcc134321f63 centos:7-ssh "/run.sh" 3 seconds ago Up 2 seconds 0.0.0.0:2222->22/tcp centos7_ssh Test ssh Visit below : # Start the container, And perform /run.sh Script, start-up ssh service The SSH The basic image of the function is named : centos:7-ssh This step is not written here, Check out my other article Docker Use Centos Image building uses Openssh Build a support SSH Mirror of the service centos:7-ssh

To create one, just support SSH Container for remote access, Then it can be provided as a development environment. Pycharm Tools are available through SSH Protocol remote access to an environment as a function of the development environment.
#Pycharm remote development Pc
My job PC System is WIN10, To prepare the Docker Is installed in vmware The virtual machine Centos7 Environmental Science. Whether windows still linux, Can support installation Docker Of. Here, Consider connecting Docker Mirror image, and Docker The mirror image can use Centos As Base Image, So you can install it smoothly ansible, And then use Pycharm Connect this Docker Mirror image can be used as the development environment. Stay Python In the development, we often encounter some thorny environmental problems, for example : If the development environment is windows, So we're developing ansible Module time, and ansible Modules are generally installed in the linux System, At this time windows Development is not easy to handle.
