{"id":23491326,"url":"https://github.com/aeron/mimalloc-container","last_synced_at":"2026-01-22T05:05:07.903Z","repository":{"id":224980424,"uuid":"764753047","full_name":"Aeron/mimalloc-container","owner":"Aeron","description":"A pre-built MiMalloc library container.","archived":false,"fork":false,"pushed_at":"2025-12-12T00:36:44.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-13T06:15:44.187Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","has_issues":false,"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/Aeron.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-28T16:41:32.000Z","updated_at":"2025-12-12T00:36:40.000Z","dependencies_parsed_at":"2024-02-28T18:26:56.461Z","dependency_job_id":"6d3fad1e-dc76-4ba2-b09c-ada066b2301f","html_url":"https://github.com/Aeron/mimalloc-container","commit_stats":null,"previous_names":["aeron/mimalloc-container"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Aeron/mimalloc-container","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aeron%2Fmimalloc-container","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aeron%2Fmimalloc-container/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aeron%2Fmimalloc-container/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aeron%2Fmimalloc-container/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Aeron","download_url":"https://codeload.github.com/Aeron/mimalloc-container/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aeron%2Fmimalloc-container/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28655098,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T01:17:37.254Z","status":"online","status_checked_at":"2026-01-22T02:00:07.137Z","response_time":144,"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":[],"created_at":"2024-12-25T01:26:53.659Z","updated_at":"2026-01-22T05:05:07.888Z","avatar_url":"https://github.com/Aeron.png","language":"Dockerfile","readme":"# MiMalloc Container\n\nA supplemental container image with pre-built [MiMalloc][mimalloc] shared libraries.\n\n[mimalloc]: https://github.com/microsoft/mimalloc\n\n## Motivation\n\nAlpine Linux is great for container images because of how compact it is. But it’s also\nknown for its slow memory allocator ([malloc-ng][malloc-ng]).\n\nSo, if you need a containerized application that relies on a system allocator and shared\nlibraries, and there is no way to compile it statically, an Alpine-based image is not a\nviable option probably.\n\nYet, there is a way—to [override][dynamic-overrride] a memory allocator. And `mimalloc`\nis usually a safe all-rounder. However, an intermediate building stage image is not\nalways convenient if you can have a pre-compiled one in reach.\n\nAnd here it is. Mostly, it’s for my personal needs. But if you find it useful as well,\ngive it a try.\n\n[malloc-ng]: https://github.com/richfelker/mallocng-draft\n[dynamic-overrride]: https://github.com/microsoft/mimalloc#dynamic-override\n\n## Usage\n\nThe container image is available as [`docker.io/aeron/mimalloc`][docker] and\n[`ghcr.io/Aeron/mimalloc`][github]. You can use both interchangeably.\n\n```sh\ndocker pull docker.io/aeron/mimalloc\n# …or…\ndocker pull ghcr.io/aeron/mimalloc\n```\n\nThe image contains both library flavors: faster `libmimalloc.so` and hardened\n`libmimalloc-secure.so`; Both are in the `/usr/lib` directory.\n\n[docker]: https://hub.docker.com/r/aeron/mimalloc\n[github]: https://github.com/Aeron/mimalloc-container/pkgs/container/mimalloc\n\n### Multi-stage Image\n\nThe simplest and precise way is to use `--from` option of the `COPY` directive, like so:\n\n```Dockerfile\nFROM docker.io/library/alpine:latest\n\nCOPY --from=docker.io/aeron/mimalloc:latest /usr/lib/libmimalloc.so /lib/.\n# …or…\nCOPY --from=docker.io/aeron/mimalloc:latest /usr/lib/libmimalloc-secure.so /lib/.\n\nENV LD_PRELOAD=/lib/libmimalloc.so\n# …or…\nENV LD_PRELOAD=/lib/libmimalloc-secure.so\n\nENV MIMALLOC_ALLOW_LARGE_OS_PAGES=1\n```\n\nIt will copy the shared library flavor you prefer in a suitable destination. And you\nneed to explicitly set the `LD_PRELOAD` and other variables (like\n`MIMALLOC_ALLOW_LARGE_OS_PAGES`) if you need them.\n\n## Acknowledgment\n\nThe [MiMalloc][mimalloc] is an open-source project made by\n[Microsoft Corporation][microsoft], [Daan Leijen][daanx], and its contributors,\navailable under [MIT license][mit-license].\n\n[microsoft]: https://github.com/microsoft\n[daanx]: https://github.com/daanx\n[mit-license]: https://opensource.org/license/MIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faeron%2Fmimalloc-container","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faeron%2Fmimalloc-container","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faeron%2Fmimalloc-container/lists"}