![]() |
6 rokov pred | |
---|---|---|
Dockerfile | 6 rokov pred | |
README.md | 6 rokov pred | |
driver-not-found-traceback.txt | 6 rokov pred |
$ sudo docker build -t koel .
$ sudo docker run --rm --name koel-db --interactive --tty \
--env POSTGRES_USER=koel --env POSTGRES_PASSWORD=secret \
--network koel --security-opt=no-new-privileges \
--cap-drop=all --cap-add=chown --cap-add=setuid --cap-add=setgid --cap-add=fowner \
postgres:10.5-alpine
$ sudo docker run --rm --interactive --tty --network koel --publish=8000:8000 \
--security-opt=no-new-privileges --cap-drop=all koel
/koel # php artisan koel:init
...
Koel cannot connect to the database. Let's set it up.
Your DB driver of choice [MySQL/MariaDB]:
[mysql ] MySQL/MariaDB
[pgsql ] PostgreSQL
[sqlsrv ] SQL Server
[sqlite-e2e] SQLite
> pgsql
DB host:
> koel
...
could not find driver
pgsql functions succeed:
/tmp # php -a
Interactive shell
php > $c = pg_connect("host=koel-db port=5432 dbname=koel user=koel password=secret");
php > var_dump(pg_fetch_all(pg_query('SELECT datname FROM pg_database WHERE datistemplate = false;')));
array(2) {
[0]=>
array(1) {
["datname"]=>
string(8) "postgres"
}
[1]=>
array(1) {
["datname"]=>
string(4) "koel"
}
}