{"id":31780718,"url":"https://github.com/malwaredb/docker","last_synced_at":"2025-10-10T08:18:25.013Z","repository":{"id":181751669,"uuid":"667245866","full_name":"malwaredb/docker","owner":"malwaredb","description":"Dockerfiles for MalwareDB, and Postgres with our similarity extensions","archived":false,"fork":false,"pushed_at":"2025-09-09T02:06:46.000Z","size":60,"stargazers_count":2,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-09T04:00:44.339Z","etag":null,"topics":["dockerfile","hacktoberfest","postgres","postgresql","similarity-measures"],"latest_commit_sha":null,"homepage":"https://malwaredb.net/","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/malwaredb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"malwaredb"}},"created_at":"2023-07-17T04:36:54.000Z","updated_at":"2025-09-09T02:06:50.000Z","dependencies_parsed_at":"2023-11-08T05:52:29.462Z","dependency_job_id":"684d352f-2a9f-457b-8cf1-a1afddaef6d8","html_url":"https://github.com/malwaredb/docker","commit_stats":null,"previous_names":["malwaredb/docker"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/malwaredb/docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malwaredb%2Fdocker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malwaredb%2Fdocker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malwaredb%2Fdocker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malwaredb%2Fdocker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/malwaredb","download_url":"https://codeload.github.com/malwaredb/docker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malwaredb%2Fdocker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279003301,"owners_count":26083555,"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","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["dockerfile","hacktoberfest","postgres","postgresql","similarity-measures"],"created_at":"2025-10-10T08:18:23.775Z","updated_at":"2025-10-10T08:18:25.008Z","avatar_url":"https://github.com/malwaredb.png","language":"Shell","funding_links":["https://github.com/sponsors/malwaredb"],"categories":[],"sub_categories":[],"readme":"## Dockerfile for MalwareDB\n\nThere are two Dockerfiles:\n* `MalwareDB/Dockerfile` builds a container with both Postgres with the extensions and MalwareDB.\n* `Postgres/Dockerfile` builds Postgres only with the extensions. This is for installations where MalwareDB should be separate from the database, or by those who'd like to use the similarity extensions.\n\nBoth use Postgres 15 from Debian 12 Bookworm.\n\n### Postgres Extensions\nPostgres is installed, and extensions built with extensions for:\n* [LZJD](https://github.com/malwaredb/LZJD)\n* [SSDeep](https://github.com/malwaredb/ssdeep_psql)\n* [SDHash](https://github.com/malwaredb/sdhash_psql)\n* [TLSH](https://github.com/malwaredb/tlsh_pg)\n\nTo use the extensions, __you__ have to add them to __each__ database schema you wish to use them as the schema owner, or as the `postgres` user. SQL commands:\n* `CREATE OR REPLACE FUNCTION lzjd_compare(TEXT, TEXT) RETURNS INTEGER AS 'lzjd_psql.so', 'pg_lzjd_compare' LANGUAGE 'c';`\n* `CREATE OR REPLACE FUNCTION fuzzy_hash_compare(TEXT, TEXT) RETURNS INTEGER AS 'ssdeep_psql.so', 'pg_fuzzy_hash_compare' LANGUAGE 'c';`\n* `CREATE OR REPLACE FUNCTION sdhash_compare(TEXT, TEXT) RETURNS INTEGER AS 'sdhash_psql.so', 'pg_sdhash_compare' LANGUAGE 'c';`\n* `CREATE OR REPLACE FUNCTION tlsh_compare(TEXT, TEXT) RETURNS INTEGER AS 'tlsh_psql.so', 'pg_tlsh_compare' LANGUAGE 'c';`\n\nBe sure to set the admin password for Postgres via the `POSTGRES_PASSWORD` environment variable, shown below.\n\n```\n$ git clone https://github.com/malwaredb/docker.git\n$ cd docker/Postgres\n$ docker build -t postgres-similarity/latest .\n$ mkdir pg_data\n$ docker run -v `pwd`/pg_data:/var/lib/postgresql/data -p 5432:5432 -e POSTGRES_PASSWORD=yoursecurepassword postgres-similarity/latest\n```\n\n### MalwareDB\nThe images are about ~4GB, could probably be smaller. The SQL commands for adding the fuzzy hash functions above are added by the `start.sh` script at container start. The Postgres server won't be accessible outside the container.\n\nYou should use this with an existing Postgres data instance so you can have the administrative settings in order (users, groups, sources). At present, the administrative functions aren't available over the HTTP API.\n\n```\n$ git clone https://github.com/malwaredb/docker.git\n$ cd docker/MalwareDB\n$ docker build -t malwaredb/latest .\n$ mkdir mdb_data\n$ mkdir mdb_data/db\n$ mkdir mdb_data/samples\n$ docker run -v `pwd`/mdb_data/db:/var/lib/postgresql/data -v `pwd`/samples:/malware_samples -p 8080:8080 malwaredb/latest\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalwaredb%2Fdocker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmalwaredb%2Fdocker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalwaredb%2Fdocker/lists"}