File save breaks docker bind mount, any fixes?

I just discovered that the way PhpStorm saves a file breaks the bind mount in a docker container.

If I have:


- type: bind
source: ./app_drupal/config/drupal/settings.php
target: /var/www/html/sites/default/settings.php

configured in a docker-compose.yml file for my drupal app service, any changes I make to settings.php will not be present in my running docker container. This is because the file's inode changes.

See: https://github.com/moby/moby/issues/15793

So, is there a way to tell PhpStorm to save things the unsafe way?

Thanks!

0
2 comments

Hi there,

>This is because the file's inode changes.

Check if you have "safe write" option enabled. If you do (most likely) then disable it.

Just go to Settings/Preferences screen and type that into a search box -- it will narrow the possible places.

1

Unchecking "safe write" fixed it. Thanks!

0

Please sign in to leave a comment.