Looks like the problem was an amd64 image built on an aarch64 host.
Building with the same architecture resolved the problem.
Thanks for the tip.
s
On 2026-03-20 12:35, Howard Chu wrote:
[email protected] wrote:
Hello,
I am running Docker on OS X Monterey, and starting up a vanilla
alpine:latest Linux image. I only installed build-base and lmdb-dev
and ran /bin/sh as root.
LMDB version (Alpine): lmdb-dev-0.9.33-r0
Inside the container, I wrote this test code:
I compiled with `gcc test_open.c -llmdb -o test_open` and ran as root,
and got this output:
env create: 0
env set maxdbs: 0
env set mapsize: 0
env open: 38
The lock file was created, not the data file.
This only occurs in the guest setup. On the OS X host and on a native
Linux host it exits with 0.
Any hints?
Most likely, the default filesystem in your docker image doesn't
support mmap().