1

I'm creating an image from a Dockerfile where I install some packages.

e.g. with wget as an example package.

RUN apt-get update -y && \ 
  apt-get install -y --no-install-recommends wget

I want to always build with an up-to-date version of packages (that I don't have to manually specify), but I need to know what the version in the image – for a CI verification. Specifically I want it to pull in the latest package and my CI will notify me if the version has changed for a package.

Edit: looks like this is not possible (https://github.com/moby/moby/issues/29110).

1

1 Answer 1

1

How about writing the packages to a file then in your CI scripts parse that file?

apt list --installed > installed_packages

docker exec -it <mycontainer> cat installed_packages

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .