You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow Open Named Configuration File... prior to attaching #4013
One more suggestion to make my life easier is allowing access to command Remote-Containers: Open Named Configuration File... in command palette prior to attaching to container, or just providing a similar command that allows me to create an attach config before attaching to container.
In my scenario, I am using Lando for my local dev, and I'm not looking to switch any time soon. However, I would like to take advantage of things like smart PHP intellisense, which only seems possible while running in a container (or having PHP installed on local machine, which I prefer not to do). Since I already have containers running in Lando with one of them running PHP, I would like to attach to that container, but I want the settings for that attached container to come from my project repository.
Also, it's unclear how often the settings get updated when you attach to a running container. I was just trying some stuff out, and I deleted the settings in /root/.vscode-server/data/Machine/settings.json on the attached container to see if settings would get loaded again. I closed remote connection, and then I attached to the same running container. The settings did not get re-imported.
I have my container settings in a directory like this on my actual local machine: ~/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/nameConfigs/NAME_OF_CONTAINER.json.
My goal would be able to store those settings in my project repo so I can easily share with the team and have them loaded from there when attaching to the running container.
I guess I can do some manual set up in Lando to get settings files where I need them on those containers, but since VSCode already has the core pieces of this feature, it'd best handled there.
Also, if any of this stuff is already possible and I just missed some documentation, please let me know! I just started trying out the remote containers feature earlier today and looking at the docs.
Once saved, whenever you open a container for the first time with the same image / container name, these properties will be used to configure the environment.
I think that answers my question on how often the settings get updated, but it's still unclear how I get to the state where it will re-import those settings. It doesn't seem to happen by closing connection and attaching again. Would I have to destroy the Lando app, and rebuild just to get those settings re-imported?
Any clarification on that would be much appreciated.
Activity
thomas-j-moffett commentedon Mar 1, 2021
I'm not sure if this is part of the original request, but it would be ideal to have the Attached Container config files specified in a repository that can be easily shared with a team. https://code.visualstudio.com/docs/remote/attach-container#_attached-container-configuration-files
In my scenario, I am using Lando for my local dev, and I'm not looking to switch any time soon. However, I would like to take advantage of things like smart PHP intellisense, which only seems possible while running in a container (or having PHP installed on local machine, which I prefer not to do). Since I already have containers running in Lando with one of them running PHP, I would like to attach to that container, but I want the settings for that attached container to come from my project repository.
Also, it's unclear how often the settings get updated when you attach to a running container. I was just trying some stuff out, and I deleted the settings in
/root/.vscode-server/data/Machine/settings.jsonon the attached container to see if settings would get loaded again. I closed remote connection, and then I attached to the same running container. The settings did not get re-imported.I have my container settings in a directory like this on my actual local machine:
~/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/nameConfigs/NAME_OF_CONTAINER.json.My goal would be able to store those settings in my project repo so I can easily share with the team and have them loaded from there when attaching to the running container.
I guess I can do some manual set up in Lando to get settings files where I need them on those containers, but since VSCode already has the core pieces of this feature, it'd best handled there.
Also, if any of this stuff is already possible and I just missed some documentation, please let me know! I just started trying out the remote containers feature earlier today and looking at the docs.
thomas-j-moffett commentedon Mar 1, 2021
I did just re-read this part from here
I think that answers my question on how often the settings get updated, but it's still unclear how I get to the state where it will re-import those settings. It doesn't seem to happen by closing connection and attaching again. Would I have to destroy the Lando app, and rebuild just to get those settings re-imported?
Any clarification on that would be much appreciated.
chrmarti commentedon Mar 2, 2021
thomas-j-moffett You can delete
data/Machine/.writeMachineSettingsMarkerto make it write the settings while attaching again.Could you open a new feature request for the repository with configs request?
thomas-j-moffett commentedon Mar 2, 2021
Christof Marti (@chrmarti) Thanks for the note on forcing it to rewrite the settings!
I opened #4584 as a feature request.