alpine/sqlite

Sponsored OSS

By alpine

Updated 2 days ago

Image

8.3K

SQLite3

DockerHub Badge

quick start
# if "test.db" is not exist, it will be created automatically
docker run -ti --rm -v $(pwd):/apps -w /apps alpine/sqlite test.db "CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT);"

# If you can run it agian, it will prompt the table has been created
docker run -ti --rm -v $(pwd):/apps -w /apps alpine/sqlite test.db "CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT);"
Error: in prepare, table users already exists
  CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT);
               ^--- error here

ls -l test.db

Docker Pull Command

docker pull alpine/sqlite