我有这个docker-compose适用于Mac和Linux但不适用于Windows :(。 知道如何解决这个问题吗?
P.S。我已经知道外部卷的解决方案,我不喜欢,因为我希望能够备份数据库文件。 搬运工-compose.yml:
version: "3.3"
services:
postgres:
build:
context: .
volumes:
- "./dotcms/pgdata:/var/lib/postgresql/data"
image: "postgres:9.6-alpine"
environment:
PGDATA: "/var/lib/postgresql/data/pgdata"
POSTGRES_DB: mydb
错误消息:
...
postgres_1 | syncing data to disk ... initdb: could not fsync file "/var/lib/postgresql/data/mypg/base/1": Invalid argument
postgres_1 | initdb: could not fsync file "/var/lib/postgresql/data/mypg/base/12403": Invalid argument
postgres_1 | initdb: could not fsync file "/var/lib/postgresql/data/mypg/base/12404": Invalid argument
postgres_1 | initdb: could not fsync file "/var/lib/postgresql/data/mypg/base": Invalid argument
...
以退出代码1
结束