run vs view
Install Code Server
Update Code Server
database:It is recommended to create a docker container for the database.
Code Language: JavaScript Code Run count: 0
docker run -it -d --name vs-db -p 8003:3306 -e "mysql_ROOT_PASSWORD=code-server" mariadb:latest # vs-db ip address # $ docker exec -it vs-db bash # $ apt update -y && apt upgrade -y && apt install net-tools iputils-ping # $ ifconfig | grep inet | grep -E -o "(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)"
Let’s go to code-server first.
Enable SSH
Code Language: JavaScript Code Run Count: 0
$ cat code-server/code-server.sh | grep ssh /usr/sbin/sshd -D &
Open ssl
First, upload your certificate file to code-server, or drag your file to code-server to upload.
Code Language: JavaScript Code Run Count: 0
vi /root/.config/code-server/config.yaml bind-addr: 0.0.0.0:8080 auth: password password: password cert: true
Restart the code-server container.
Code Language: JavaScript Code Run Count: 0
docker restart code-server docker exec -it code-server /bin/zsh cd /root/.local/share/code-server cp /root/xrsec.key localhost.key cp /root/xrsec.crt localhost.crt exit docker restart code-server
Then you can notice in the upper right corner that you need to configure SSL to use it.
It’s like real code-server.
Xdebug
Code Language: JavaScript Code Run Count: 0
Open https://www.php.cn/link/4b9f946525b8fc99573ed7ef8f2918ea on the page.
Breakpoint testing with PHP debug plug-in.
Then visit the web page, such as https://www.php.cn/link/8591efe6006d839c23452153789dc667.
Other
Code Language: JavaScript Code Run Count: 0
pecl74 install pecl56 install /code-server.sh /root/code-server/server/php/php56/lib/php.ini /root/code-server/server/php/php74/lib/php.ini /etc/nginx/nginx.conf /etc/proxychains.conf /etc/ssh/sshd_config /root/.ssh /root/.zshrc /root/.pip/pip.conf /root/.gitconfig
Bug
When you switch to the applet and then switch to the Directory, the page will not respond. It may be a problem with PWA. You just need to open it with a browser.
Then it will be displayed normally.
On Mac && ctrl + ~ vim’s ESC button cannot be used on the command line.
Code Language: JavaScript Code Run Count: 0
vim 1i esc ???????? # You cannot use the ESC key to exit editing mode # advice # $ cat /etc/profile # ctrl && Click file path The editor can be summoned
PHP5.6 with PHP xdebug.launch.json; There is a special configuration, but I forgot, please help me.
I had to consider using the github API to automatically obtain new versions of software packages due to the high update frequency and low compilation speed, so the container may be started later. The update program will be automatically executed and the code server version will be updated. You need to restart the docker container manually.
If you have other suggestions or ideas, please feel free to send them.