{"id":13558576,"url":"https://github.com/KEINOS/Dockerfile_of_SQLite3","last_synced_at":"2025-04-03T13:31:36.964Z","repository":{"id":40434918,"uuid":"183606585","full_name":"KEINOS/Dockerfile_of_SQLite3","owner":"KEINOS","description":"Latest SQLite3 on Alpine Docker image. (AMD64/Intel, Arm64, Arm6, Arm7)","archived":false,"fork":false,"pushed_at":"2025-03-30T20:03:11.000Z","size":131,"stargazers_count":37,"open_issues_count":5,"forks_count":16,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-30T21:19:42.184Z","etag":null,"topics":["arm6","arm64","armv7","docker","docker-image","sqlite","sqlite3"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KEINOS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-04-26T10:09:49.000Z","updated_at":"2025-02-21T01:22:10.000Z","dependencies_parsed_at":"2023-10-01T22:30:56.423Z","dependency_job_id":"c14af4aa-6a7f-4de8-8687-6c3362874bbb","html_url":"https://github.com/KEINOS/Dockerfile_of_SQLite3","commit_stats":null,"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KEINOS%2FDockerfile_of_SQLite3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KEINOS%2FDockerfile_of_SQLite3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KEINOS%2FDockerfile_of_SQLite3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KEINOS%2FDockerfile_of_SQLite3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KEINOS","download_url":"https://codeload.github.com/KEINOS/Dockerfile_of_SQLite3/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247009636,"owners_count":20868583,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arm6","arm64","armv7","docker","docker-image","sqlite","sqlite3"],"created_at":"2024-08-01T12:05:02.402Z","updated_at":"2025-04-03T13:31:36.951Z","avatar_url":"https://github.com/KEINOS.png","language":"Shell","readme":"\u003c!-- markdownlint-disable MD001 MD033 MD034 MD041 --\u003e\n# Dockerfile of SQLite3\n\nAlpine Docker image of SQLite3 built from the latest source code.\n\n```bash\ndocker pull keinos/sqlite3:latest\n```\n\n- Current SQLite3 version:\n  - [![SQLite Version](https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2FKEINOS%2FDockerfile_of_SQLite3%2Fmaster%2FSQLite3-shields.io-badge.json)](https://github.com/KEINOS/Dockerfile_of_SQLite3/blob/master/VERSION_SQLite3.txt)\n  - [View Available Tags (SQLite version)](https://hub.docker.com/r/keinos/sqlite3/tags) @ DockerHub\n- Supported Architecture:\n  - ARM64, ARMv6, ARMv7 and Intel/AMD64\n- INIT System Support:\n  - [Tini](https://github.com/krallin/tini) (Fix:[#65](https://github.com/KEINOS/Dockerfile_of_SQLite3/pull/65))\n- Scan Status:\n  - [![Snyk Docker Scan](https://github.com/KEINOS/Dockerfile_of_SQLite3/actions/workflows/container-analysis.yml/badge.svg)](https://github.com/KEINOS/Dockerfile_of_SQLite3/actions/workflows/container-analysis.yml)\n  - [![Container Scan](https://github.com/KEINOS/Dockerfile_of_SQLite3/actions/workflows/container_scan.yml/badge.svg)](https://github.com/KEINOS/Dockerfile_of_SQLite3/actions/workflows/container_scan.yml)\n\n\u003cdetails\u003e\u003csummary\u003eImage Information (Dockerfile, Security Scan, etc.)\u003c/summary\u003e\n\n- INIT Support:\n  - As of `3.47.2-20241207-tini`, the image supports [Tini](https://github.com/krallin/tini) as the default init process. (See issue [#65](https://github.com/KEINOS/Dockerfile_of_SQLite3/pull/65))\n    - Originally SQLite3 was run as the PID 1 process. [This](https://github.com/KEINOS/Dockerfile_of_SQLite3/pull/65) change was made to ensure the container stops gracefully when receiving `SIGTERM` or `SIGINT` (e.g., `docker stop`).\n- Repositories/Registries:\n  - [Image Registry](https://hub.docker.com/r/keinos/sqlite3)  @ DockerHub\n  - [Dockerfile](https://github.com/KEINOS/Dockerfile_of_SQLite3/blob/master/Dockerfile) @ GitHub\n  - [Issues](https://github.com/KEINOS/Dockerfile_of_SQLite3/issues) @ GitHub\n- Build Info:\n  - Base Image: `alpine:latest`\n  - SQLite3 Source: [https://www.sqlite.org/src/](https://www.sqlite.org/src/doc/trunk/README.md) @ SQLite.org\n  - Update Interval: [Once a week](https://github.com/KEINOS/Dockerfile_of_SQLite3/blob/master/.github/workflows/weekly-update.yml)\n- Basic Vulnerability Scan:\n  - [Snyk Docker Scan](https://docs.snyk.io/integrate-with-snyk/snyk-ci-cd-integrations/github-actions-for-snyk-setup-and-checking-for-vulnerabilities/snyk-docker-action) and [Grype Container Scan](https://github.com/anchore/scan-action) on push, PR and merge.\n  - Scan Interval: Once a week.\n  - See the [Security overview](https://github.com/KEINOS/Dockerfile_of_SQLite3/security) for the details.\n\n\u003c/details\u003e\n\n## Usage\n\n### Pull the latest image\n\n```shellsession\n$ docker pull keinos/sqlite3:latest\n**snip**\n```\n\n\u003cdetails\u003e\u003csummary\u003eSBOM Support\u003c/summary\u003e\n\nThe images supports [SBOM](https://www.cisa.gov/sbom). You can check the software components used in the image as below.\n\n```shellsession\n$ docker sbom keinos/sqlite3:latest\nSyft v0.43.0\n ✔ Loaded image\n ✔ Parsed image\n ✔ Cataloged packages      [14 packages]\n\nNAME                    VERSION      TYPE\nalpine-baselayout       3.6.5-r0     apk\nalpine-baselayout-data  3.6.5-r0     apk\nalpine-keys             2.4-r1       apk\napk-tools               2.14.4-r0    apk\nbusybox                 1.36.1-r29   apk\nbusybox-binsh           1.36.1-r29   apk\nca-certificates-bundle  20240226-r0  apk\nlibcrypto3              3.3.1-r0     apk\nlibssl3                 3.3.1-r0     apk\nmusl                    1.2.5-r0     apk\nmusl-utils              1.2.5-r0     apk\nscanelf                 1.3.7-r2     apk\nssl_client              1.36.1-r29   apk\nzlib                    1.3.1-r1     apk\n```\n\n\u003c/details\u003e\n\n### Specify the version to pull\n\n```shellsession\n$ docker pull keinos/sqlite3:3.44.2\n...\n```\n\n### Build locally\n\n```shellsession\n$ docker build -t sqlite3:local https://github.com/KEINOS/Dockerfile_of_SQLite3.git\n...\n```\n\n### Interactive\n\nRunning `sqlite3` command inside the container interactively.\n\n```shellsession\n$ docker run --rm -it -v \"$(pwd):/workspace\" -w /workspace keinos/sqlite3\nSQLite version 3.28.0 2019-04-16 19:49:53\nEnter \".help\" for usage hints.\nConnected to a transient in-memory database.\nUse \".open FILENAME\" to reopen on a persistent database.\nsqlite\u003e .open ./sample.db\nsqlite\u003e CREATE TABLE table_sample(timestamp TEXT, description TEXT);\nsqlite\u003e INSERT INTO table_sample VALUES(datetime('now'),'First sample data. Foo');\nsqlite\u003e INSERT INTO table_sample VALUES(datetime('now'),'Second sample data. Bar');\nsqlite\u003e .quit\n$ ls\nsample.db\n```\n\n- Note that you need to mount the working directory as a volume to the container.\n\n### Command\n\n- Running `sqlite3 --version` command:\n\n```shellsession\n$ docker run --rm keinos/sqlite3 sqlite3 --version\n3.38.2 2022-03-26 13:51:10 d33c709cc0af66bc5b6dc6216eba9f1f0b40960b9ae83694c986fbf4c1d6f08f\n```\n\n- Executing SQL query to the mounted database:\n\n```shellsession\n$ ls\nsample.db\n$ docker run --rm -it -v \"$(pwd):/workspace\" keinos/sqlite3 sqlite3 /workspace/sample.db -header -column 'SELECT rowid, * FROM table_sample;'\nrowid  timestamp            description\n-----  -------------------  -----------------------\n1      2022-04-16 14:09:52  First sample data. Foo\n2      2022-04-16 14:09:58  Second sample data. Bar\n```\n\n- Note that you need to mount the working directory as a volume to the container.\n\n### Run test\n\nThis container includes a [simple test script](https://github.com/KEINOS/Dockerfile_of_SQLite3/blob/master/run-test.sh).\n\nYou can run the script to see if the container and `sqlite3` binary is working. Though, not sutiable for HEALTHCHECK usage.\n\n```shellsession\n$ docker run --rm keinos/sqlite3 /run-test.sh\n- Creating test DB ... created\nrowid  timestamp            description\n-----  -------------------  -----------------------\n1      2022-04-16 14:18:34  First sample data. Hoo\n2      2022-04-16 14:18:34  Second sample data. Bar\n- Testing ...\n  1st row value ... OK\n  2nd row value ... OK\n\n- Test result:\nsuccess\n$ echo $?\n0\n```\n\n- [Let us know](https://github.com/KEINOS/Dockerfile_of_SQLite3/issues) if you have any test to be included.\n\n## ToDo\n\n- [x] ~~ARM support for DockerHub~~ (Issue #[2](https://github.com/KEINOS/Dockerfile_of_SQLite3/issues/2), PR #[20](https://github.com/KEINOS/Dockerfile_of_SQLite3/pull/20))\n\n## License\n\n- Dockerfile: [MIT License](https://github.com/KEINOS/Dockerfile_of_SQLite3/blob/master/LICENSE.md) by [The Dockerfile of SQLite3 Contributors](https://github.com/KEINOS/Dockerfile_of_SQLite3/graphs/contributors).\n- SQLite: [Public Domain](https://sqlite.org/copyright.html) by [D. Richard Hipp](https://en.wikipedia.org/wiki/D._Richard_Hipp) and [SQLite.org](https://sqlite.org/).\n- The below packages in the container are: [GPL-3.0-or-later](https://spdx.org/licenses/GPL-3.0-or-later.html)\n  - [GNU patch](https://savannah.gnu.org/projects/patch/)\n  - [GNU make](https://www.gnu.org/software/make/)\n  - [GNU dbm](https://www.gnu.org.ua/software/gdbm/) (gdbm)\n  - [Debian fakeroot](https://salsa.debian.org/clint/fakeroot)\n  - [GNU Readline Library](https://tiswww.cwru.edu/php/chet/readline/rltop.html)\n  - [GNU Tar](https://www.gnu.org/software/tar/)\n","funding_links":[],"categories":["Shell","docker"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKEINOS%2FDockerfile_of_SQLite3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FKEINOS%2FDockerfile_of_SQLite3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKEINOS%2FDockerfile_of_SQLite3/lists"}