tern
tern copied to clipboard
utils/dockerfile.py: accept build arguments if any
Dockerfile's ARG directive can store build arguments given to docker build as --build-arg. Tern cannot get this from Docker itself and hence needs to be accepted through some command line option when providing a Dockerfile. So Tern needs come command line options like --docker-build-args which should then be passed on to get_base_image_tag in dockerfile.py. It seems that not many dockerfiles use ARG so we will see how badly this is needed.
@rnjudge is this still on the table?
@nishakm To me this seems better suited for the Dockerfile Lock functionality but will likely need to be pushed to the next release unless there is someone to work on it now.
@nishakm To me this seems better suited for the Dockerfile Lock functionality but will likely need to be pushed to the next release unless there is someone to work on it now.
Just a reminder, the SBOM generation also builds docker images from dockerfiles. If you supply it the dockerfile argument, it currently ignores all other arguments about what to scan and builds the container image for scanning.
Just wanted to point out that tern seems to be very focused on building the image from a Dockerfile, and not just for the lockfile.