Mounted host directories not compatible with PostgreSQL

Expected behavior

When running

docker run -it --rm -v `pwd`/test:/var/lib/postgresql/data postgres

initdb should run without errors.

Actual behavior

Initdb ends up in random disk write errors like:

creating template1 database in /var/lib/postgresql/data/base/1 ... FATAL:  could not write to file "pg_xlog/xlogtemp.25": Input/output error


FATAL:  could not close file "base/1/1249": Input/output error
FATAL:  could not close file "base/1/2603": Input/output error
CONTEXT:  writing block 0 of relation base/1/1247


OS X 10.11.5

Steps to reproduce the behavior

  1. Run the above command

I cannot reproduce this issue on Beta 21 (build 11019). I think this issue has likely been fixed. If you could try out your use case and let us know if the problem still occurs, we’d really appreciate it.

Thanks for participating in the Docker for Mac Beta!

Best regards,


Yes, on 1.12.0 stable this too isn’t happening.