How to make VS-Code Flatpak to detect Docker Snap
Asked Answered
J

0

6

In my conquest to make all my apps run from containers, I have, as expected, ran into some problems. I installed VS-Code as a Flatpak and installed the Docker plugin, but the plugin is not able to detect the docker binary because docker is actually running in a snap.

STEPS TO REPLICATE:

snap install docker
flatpak install com.visualstudio.code

EXPECTED RESULT:

All resource monitors work and docker is detected.

ACTUAL RESULT:

Nothing works. Starting a terminal and executing echo $PATH gives: /app/bin:/app/bin:/usr/bin which is not my actual path.

THINGS I HAVE TRIED:

  • export PATH=$PARH:/snap/bin but /snap/bin shows as empty in the integrated terminal
  • export PATH=$PARH:/snap/docker/current/bin integrated terminal now works but the rest of the monitors and build options do not.
  • setting the docker PATH in the plugin settings '/snap/docker/current/bin' but now gives: Failed to connect. Is Docker installed and running? Error: connect ENOENT /var/run/docker.sock
  • giving permissions to the vscode flatpak like:
flatpak override --filesystem=host-os com.visualstudio.code 
flatpak override --filesystem=host com.visualstudio.code
flatpak override --filesystem=/snap/bin com.visualstudio.code

did not seem the be any difference

Joleen answered 18/10, 2021 at 14:5 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.