I am using Docker on macOS 12.3 with the options:
Use the new Virtualization framework
Enable VirtioFS accelerated directory sharing
I am trying to create a PostgreSQL container:
mkdir -p ~/Developer/postgres_data
docker run -d --name postgres -p 5432:5432 --platform linux/arm64/v8 -e POSTGRES_PASSWORD=postgres -v /Users//Developer/postgres_data:/var/lib/postgresql/data postgres:13
But starting this container fails with:
docker logs postgres
The files belonging to this database system will be owned by user “postgres”.
This user must also own the server process.
The database cluster will be initialized with locale “en_US.utf8”.
The default database encoding has accordingly been set to “UTF8”.
The default text search configuration will be set to “english”.
Data page checksums are disabled.
fixing permissions on existing directory /var/lib/postgresql/data … ok
creating subdirectories … ok
selecting dynamic shared memory implementation … posix
selecting default max_connections … 100
selecting default shared_buffers … 128MB
selecting default time zone … Etc/UTC
creating configuration files … ok
2022-03-30 19:25:49.792 UTC [40] LOG: could not open file “pg_wal/000000010000000000000001”: No such file or directory
2022-03-30 19:25:49.792 UTC [40] FATAL: could not open file “pg_wal/000000010000000000000001”: No such file or directory
child process exited with exit code 1
initdb: removing contents of data directory “/var/lib/postgresql/data”
running bootstrap script … %