Running postgrest requires the libpq library runtime, not the -dev package. Make sure that tools that are used to download and extract the postgrest package do not remain installed in the image.