After solving the installation of docker desktop above, I continue to operate according to the instructions of vs code plug-in remote container, in order to connect and edit the files in the container on the remote server (Linux) on the PC (Windows).
After everything is completed, the container is connected, but an error is reported. The log content is cannot connect to the docker daemon at http://docker.example.com. Is the docker daemon running. However, the docker desktop of my PC has already started docker, no problem.
After searching, I found that my account on the server is not in the docker group, that is, I need sudo to execute the docker instruction every time. The solution is to add my account to the docker group.
Add according to the instructions on the official website, and then everything goes well and the problem is solved. The following code is a simple version, you can go directly to the official website.
cat /etc/group | grep docker # Print group information and filter with grep to view onlydocker # If there are no results, run the following command to create a new docker group sudo groupadd docker # If the cat command yields results, then instead of creating a new group, just run the following command sudo usermod -aG docker $USER # where $USER is replaced by your account name newgrp docker # In Linux environment, make the group update take effect; other environments see the official website link docker run hello-world # Check if docker can be executed without sudo
To access files in a remote server’s container with vs Code
1. Install VS code on PC
2. Connect to the server remotely: Find the Remote-SSH plug-in in the extension of VS code, configure the ssh file after installation, and connect to the server successfully
3. Find Remote-Container in the extension of VS code, install it, and then install docker and WSL2 software according to the extension’s introduction ( the link where the problem occurred above )
4. Connect to the server according to the introduction of Remote-Container (the problematic link in this article)
- Docker Error: error invoking remote method ‘docker-start-container‘: error: (http code 500) server error –
- [Solved] Docker error: “unknown runtime specified NVIDIA” using GPU“
- How to Solve Docker delete container image error: Error response from daemon: conflict: unable to delete 7cc1942f1ed5 (must be forced)
- Linux Install Docker Error: Failed to restart docker.service: Unit docker.service not found.
- [docker][issue]Error response from daemon: mkdir xxx: file exists: unknown
- Docker Run ‘echo core ＞ /proc/sys/kernel/core_pattern‘ Error
- Linux accesses the shared directory of windows, pysmb (parameter remote)_Name (defined)
- [Solved] Docker Install Error: [Errno 14] curl#60 – Peer‘s Certificate issuer is not recognized
- [Solved] git error – remote: http basic: access denied
- [Solved] error:getaddrinfo ENOTFOUND xxx.xxxx.com xxx.xxxx.com:443
- The docker export container cannot be run after being imported: error response from daemon: no command specified
- Docker Startup Error: standard_init_linux.go:211: exec user process caused “no such file or directory”
- [Solved] Linux installation pillow error: ValueError: jpeg is required unless explicitly disabled using –disable-jpeg, aborting
- docker-compose -version Run Error [How to Fix]
- Linux Ubuntu Django Error: uwsgi: error while loading shared libraries: libpcre.so.1
- How to Solve Error: Driver “kvm2“ not found
- The solution of insufficient disk space of docker in Ubuntu
- Install and start the tftp-server server and possible solutions to Redirecting to /bin/systemctl restart xinetd.service problems
- How to Use Apt get Command Under Mac OSX
- NVIDIA SMI error after Ubuntu 20.04 restart [How to Solve]