testcontainers / testcontainers-dotnet

A library to support tests with throwaway instances of Docker containers for all compatible .NET Standard versions.

Home Page:https://dotnet.testcontainers.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add SQLite package

hishamco opened this issue · comments

Problem

Lack to support SQLite database OOB

Solution

Introducing Testcontainers.Sqlite package

Benefit

Allow devs to use SQLite

Alternatives

Nothing

Would you like to help contributing this enhancement?

Yes

Could you please elaborate on what are the advantages of using a Docker container over directly using one of the many available SQLite libraries such as Microsoft.Data.Sqlite, SQLite-net or System.Data.SQLite?

I working on an OSS project I just find myself need a docker image for integration testing. I know I can manage it myself by creating a .db but I need to cleanup everything after the testing

Couldn't you use the generic container builder? We could add a section to our documentation covering common builder patterns, similar to an article or how-to guide. I am uncertain whether we require modules for all kinds of "simple" configurations.

Is there even a container image available? How would you access the database from remote? Looking forward to discussing this topic and hear your thoughts (since I would simply store the database in-memory and might miss something).

Is there even a container image available?

https://hub.docker.com/r/keinos/sqlite3#!

(since I would simply store the database in-memory and might miss something).

This sometimes problematic especially in testing

https://hub.docker.com/r/keinos/sqlite3#!

As I commented here, I do not think it hosts a database accessible remotely. According to the Docker Hub docs, they also mount the database file from the host. I am not sure how you are planning to implement a module, but I am curious to see the proof of concept.

I will close this issue. As mentioned, I do not think the image is a hosted SQLite instance. If you have any further information, do not hesitate to reopen the issue.