-
-
Notifications
You must be signed in to change notification settings - Fork 409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VS Code does not see docker engine is running via remote (SSH) #141
Comments
This is not colima's fault 😄 VSCode's Docker / Remote Containers extension does not respect the In order to make VSCode use the On macOS press
The setting(s) can be applied per workspace/directory if you add it to See: VSCode Documentation - Conntect Using Docker Contexts Please close the issue if my answer resolves your issue as it is not related to |
I have tried setting VSCODE setting as you mention and it does not work. That seems a VSCode issue. The only fix that works which is what
Hope this helps. |
thanks @olegTarassov that also worked for me !!! Now VSCode works fine with colima. @abiosoft I am on an Intel mac.. If anyone is on an Arm Mac, can they report back about if @olegTarassov fix works for them too ... |
@olegTarassov 's solution works. MacBook Pro (13-inch, M1, 2020)
|
Updating @nifr's answer. The correct config according to the docs is below. Get your context details with "docker.environment": {
"DOCKER_HOST": "unix:///Users/USER_NAME/.colima/docker.sock",
"DOCKER_CONTEXT": "colima"
} |
Just to add to the above comment that worked for me. Run the following commands to check your Colima Socket Location, and that your Docker Context is Colima and the Endpoint is correct: ❯ colima status -e
INFO[0000] colima is running using QEMU
INFO[0000] arch: x86_64
INFO[0000] runtime: docker
INFO[0000] mountType: sshfs
INFO[0000] socket: unix:///Users/MyUser/.colima/default/docker.sock
INFO[0000] cpu: 2
INFO[0000] mem: 2GiB
INFO[0000] disk: 60GiB ❯ docker context ls
NAME DESCRIPTION DOCKER ENDPOINT ERROR
colima colima unix:///Users/MyUser/.colima/default/docker.sock
default * Current DOCKER_HOST based configuration unix:///Users/MyUser/.colima/default/docker.sock
Warning: DOCKER_HOST environment variable overrides the active context. To use a context, either set the global --context flag, or unset DOCKER_HOST environment variable. Then in VSCode, you can either:
NOTE: After changing these settings, you will have to restart VSCode to see this changes propagated. |
You just need to change the vscode settings and put these lines: "docker.dockerPath": "/opt/homebrew/bin/docker",
"docker.composeCommand": "/opt/homebrew/bin/docker-compose" It works for me: |
I am using VS Code on my M1 MBP, with Docker via colima on my Intel iMac. But attempting to open my project in a dev container shows:
If I open the project in a dev container in VS Code directly on the Intel iMac, it works.
With Docker Desktop running on the iMac (or a remote Ubuntu 20.04 LTS EC2), I can do
Remote-SSH: Connect to Host...
then open the project directory thenRemote-Containers: Rebuild and Reopen in Container
and it works.My
~/.docker/config.json
on the iMac is:The text was updated successfully, but these errors were encountered: