alpine/sqlite
# 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 alpine/sqlite