基于Alpine Linux的SQLite3 Docker镜像,用于通过容器快速执行SQLite3命令,支持自动创建数据库文件及进行数据库表创建等操作。
https://sqlite.org/
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
镜像拉取方式
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
DockerHub 原生拉取命令
docker pull alpine/sqlite:<标签>
用户好评
来自真实用户的反馈,见证轩辕镜像的优质服务