Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker Image with SQLite support? #989

Closed
kkoellner-shl opened this issue Oct 11, 2022 · 1 comment
Closed

Docker Image with SQLite support? #989

kkoellner-shl opened this issue Oct 11, 2022 · 1 comment
Labels

Comments

@kkoellner-shl
Copy link

Does one of your official Docker images still supports SQLite as storage engine (as listed in your sample config)?
The documentation of the nginx-fpm-alpine image at least mentions sqlite once while the documentation of the pdo image doesn't.

I tried both but I'll get the following error:

PHP message: PHP Fatal error: Uncaught PDOException: could not find driver in /srv/lib/Data/Database.php:110
privatebin | Stack trace:
privatebin | #0 /srv/lib/Data/Database.php(110): PDO->__construct()
privatebin | #1 [internal function]: PrivateBin\Data\Database::getInstance()
privatebin | #2 /srv/lib/Model.php(86): forward_static_call()
privatebin | #3 /srv/lib/Controller.php(199): PrivateBin\Model->getStore()
privatebin | #4 /srv/lib/Controller.php(125): PrivateBin\Controller->_create()
privatebin | #5 /var/www/index.php(18): PrivateBin\Controller->__construct()
privatebin | #6 {main}

Using your sample config:

[model]
; example of DB configuration for SQLite
class = Database
[model_options]
dsn = "sqlite:" PATH "data/db.sq3"
usr = null
pwd = null
opt[12] = true ; PDO::ATTR_PERSISTENT

@elrido
Copy link
Contributor

elrido commented Oct 12, 2022

As was recently discussed, these don't support SQLite (and likely haven't done so since at least the switch to the alpine base image). If you don't want to use it with MariaDB, MySQL or Postgres, I highly recommend using the filesystem storage as it has similar requirements as SQLite (storage attached to the image), but less limitations. Further details are explained in this comment: #975 (reply in thread)

I've raised a PR to address the misleading wording in the README and updated the description on docker hub.

@elrido elrido added the wontfix label Oct 25, 2022
@elrido elrido closed this as completed Oct 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants