So I seem to recall experiencing a similar issue when modifying the .ini file, and I cannot recall exactly how I got around it. Are you definitely logged in as a root user? (or does that concept not even apply to docker, which I admittedly have no experience with). Maybe try using something other than vi to edit / save the file?