Closed jalil-salame closed 2 months ago
I am having other issues with images created by dockerTools
which can be attributed to shiplift
(the docker library used). Shiplift hasn't been updated in 3 years and assumes things that are no longer true, I suggest migrating away from it in favor of bollard
which is more up to date.
Specifically shiplift expects the virtual_size
field to be present, but it is not guaranteed to be:
virtual_size: Total size of the image including all layers it is composed of. Deprecated: this field is omitted in API v1.44, but kept for backward compatibility. Use Size instead
For anyone coming across this issue, you can temporarily fix it by rolling back docker (sudo dnf downgrade docker
) to version 24 which still sends the deprecated field.
Thank you! Downgrading to Docker 24.0.5 fixed my issue
I use
dockerTools.buildLayeredImage
to build docker images. It setsEnv
,Entrypoint
, andCmd
tonull
if not set, this causesnitro-cli build-enclave
to fail:Entrypoint
orCmd
isnull
then it fails withUnsupportedEntryPoint
If both
Entrypoint
andCmd
are notnull
andEnv
isnull
then it panics here:https://github.com/aws/aws-nitro-enclaves-cli/blob/bc9c0b8362287698c0348ffd1df1fcaa9f0ccce3/enclave_build/src/docker.rs#L331
I think the panic is because of a logic bug:
https://github.com/aws/aws-nitro-enclaves-cli/blob/bc9c0b8362287698c0348ffd1df1fcaa9f0ccce3/enclave_build/src/docker.rs#L328-L337
Should instead be:
I don't know how docker handles it, but my assumption is:
Entrypoint
isnull
, then useCmd
Cmd
isnull
, then useEntrypoint
I have tested the images directly with docker and they work as expected.