- 最新
- 最多得票
- 最多評論
In our case the same error was seemingly caused by the missing directory entries in the image filesystem. You can verify their presence by first doing docker export
to tar file:
docker image ls
# find out the image you need
docker create --name="image-export" <your-image-here>
docker export "image-export" > "image-export.tar"
docker rm "image-export"
and then listing its contents via tar tf image-export.tar
. The example ouput below contains directory entries (lines ending with "/")
app/
app/app.bin
bin/
bin/bash
bin/cat
The image having those lines in tar tf
output was working properly on Lambda while the image that haven't had them failed with error message similar to what you've encountered.
We tracked down the issue to distroless - https://github.com/GoogleContainerTools/distroless/blob/3cfaaa01d9e53c2cd17b9fba8e3877981f5b4349/cacerts/cacerts.bzl#L31
Tar layer created with a file under /usr/share/doc/ca-certificates/copyright but without including empty folders for the tree structure leading up to it /usr, /usr/share, ... etc was causing the issue.
相關內容
- AWS 官方已更新 9 個月前
- AWS 官方已更新 2 年前
- AWS 官方已更新 2 年前