Mac OSマシン上のデータフォルダ用のボリュームを設定してpostgresコンテナを実行する際に問題があります。 私はこのようなことは、このような実行しようとした:docker-machineでデータボリュームのpostgresコンテナを実行する
docker run \
--name my-postgres \
-e POSTGRES_USER=admin \
-e POSTGRES_PASSWORD=password \
-e POSTGRES_DB=some_db_dev \
-v $PG_LOCAL_DATA:/var/lib/postgresql/data \
-d postgres:9.5.1
私はログに次のような結果を得たたび:ドッキングウィンドウの
* Starting PostgreSQL
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 enabled.
fixing permissions on existing directory /var/lib/postgresql/data ... ok
initdb: could not create directory "/var/lib/postgresql/data/pg_xlog": Permission denied
initdb: removing contents of data directory "/var/lib/postgresql/data"
バージョンを、ドッキングウィンドウマシン、VirtualBoxのとboot2dockerは、次のとおりです。
docker-machine version 0.6.0, build e27fb87
Docker version 1.10.2, build c3959b1
VirtualBox Version 5.0.16 r105871
boot2docker 1.10.3
このトピックに関する多くの出版物を見ましたが、ほとんどが古くなっています。私はmysqlの場合と同様の解決策を試みたが、それは役に立たなかった。
多分誰かが私を更新することができます:ドッカーマシンを介してデータボリュームを持つpostgresコンテナを実行するいくつかのソリューションがありますか?
ありがとうございます!