1

I'm using PhpStorm with Docker plugin.

I'm connecting to my docker daemon via "Docker for Windows".

I can view the files from container in editor but I cannot modify them. In VS Code I can modify them. Is it possible to do so in PhpStorm as well, and how?

2
  • Are you running vscode as admin / a user with elevated permissions? People usually run their docker containers as root, (which I don't prefer personally) and you try to access / edit files in it as a normal user,it will cause permission issues. Commented Jul 23, 2021 at 8:02
  • Running it as normal user. Tried to run Storm as administrator but problem persists. Commented Jul 23, 2021 at 8:36

1 Answer 1

3

No, it's not possible in PhpStorm. A possibility to edit & save files in a container is being worked on, see https://youtrack.jetbrains.com/issue/IDEA-176734#focus=Comments-27-3565950.0-0.

There are two possible workarounds:

  • You can try editing your files with a host editor.

How to edit Docker container files from the host?

  • You can try running docker cp command to get the file out of the container, then editing it and copying it back and restarting the container.

How to edit files in stopped/not starting docker container

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.