LoginSignup
2
0

More than 3 years have passed since last update.

postgresのdockerコンテナを作るときに出たエラー

Posted at

エラー内容

...

db_1  |
db_1  |
db_1  | /usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/init.sh
db_1  | /usr/local/bin/docker-entrypoint.sh: /docker-entrypoint-initdb.d/init.sh: /bin/bash: bad interpreter: Permission denied

...

原因と解決策

原因はホストのinit.shの実行権限がないためでした。そのため下記のコマンドを実行後にdocker-compose up -d する必要がありました。

chmod a+x ./docker-entrypoint-initdb.d/init.sh

コンテナの方でinit.shが権限ないのかなと思い試行錯誤していたため、解決に少し時間がかかってしまいました。。。

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0