apko icon indicating copy to clipboard operation
apko copied to clipboard

e2e testing that ensures `apko` builds smaller images than `Dockerfile`

Open mattmoor opened this issue 3 years ago • 2 comments

The idea here is to have a test that's parameterized with a list of Alpine packages, and does builds two ways:

  1. apko with packages: <list>
  2. A Dockerfile with FROM alpine:latest -> apk add --update <list>

We should then compare the resulting size of these images to ensure that what apko generates is optimal (and perhaps other properties list same/fewer packages in an SBOM generated by syft or bom). If this e2e test leg generated a little report of the deltas, it would also be a nice comparison to link for folks curious what apko can do for them (cc @kimsterv)

Also given the template above, we should then be able to generate a suite of package lists like what I found with git-init where we were inadvertently much larger than the Alpine/Dockerfile-based variant.

mattmoor avatar Mar 26 '22 17:03 mattmoor

in general i would say that apko should at least not exceed the size of the dockerfile version but in some cases won’t be smaller (alpine-base is alpine-base after all)

kaniini avatar Mar 26 '22 21:03 kaniini

The general goal is “no bigger”. Same size seems inevitable in such cases, but I think we would all be curious if the apko version was larger than the traditional form

mattmoor avatar Mar 26 '22 21:03 mattmoor