Make a Docker Container a PHP Storm Deployment

This may possibly be a simple question with a simple answer, I'm still figuring out how Docker works.

Here's my setup: I have a Docker container running locally on my computer (Windows 10), and it works and runs. (It's a magento image, networked with a mariadb imageand an elasticsearch image). I can CLI into the server and manage everything locally and browse around.

If this were a remote server, I would next set it up as a deployment. That is, files would be local on my computer and when I saved the file it would push up to the server and then I could refresh and see the changes. I can't figure out what combination of settings I can get to make this work with PHPStorm. Like I said, it might be really simple but I can't find answers online. I think it's because the word "deployment" in Docker context means "create an instance" or "make it run." All my searching keeps taking me back to the same Docker plugin documentation which doesn't cover this setup.

I do have the Docker plugin, and can successfully connect to the container. I can even browse and edit the files. But the two major annoying limitations of this setup are that I have to browse all the way from the root (instead of relative to a specific root folder) and I don't have Git integration so I can't see changed files or do a Git diff. What I want is to set it up as a deployment but I don't know what I need to change in my Docker setup to enable this. Can anyone help?

0
1 comment
Avatar
Permanently deleted user

I was able to work this out. All I needed to do was open port 22, setup ssh and then connect like I normally would using localhost exactly like I would a remote server. Like I'd said, I knew it would be something simple.

0

Please sign in to leave a comment.