$ container-diff analyze -type=pip python:3.10-bullseye Similarly, you can get a list of globally-installed packages for Node and Python with -type=node and -type=pip. $ container-diff analyze -type=apt postgres:14 Change it to -type=apt to find out which OS-level packages are installed. So, for instance, we can analyze a PostgreSQL image with: $ container-diff analyze postgres:14 Then, the contents are scanned, and a report is printed out. The tool pulls the image from the registry and unpacks the filesystem into $HOME/.container-diff/cache. The command to analyze an image looks like this: container-diff analyze Layer history: prints the commands that generated each of the layers in the image.Filesystem: shows all the files in the image and their size.Packages: shows a list of OS-installed packages (only for Debian-based distros), as well as those installed with pip and npm.Testing containersĬontainer-diff has the following test modes: The project, developed by many of the same faces behind Container Structure Tests, does a lot more than just diffing: it can analyze container images, show installed packages, and reverse-engineer the commands used to generate them. Introducing container-diffĪvailable in macOS, Linux, and Windows, container-diff (like the name suggests) is diff for container images. So, let’s elaborate a bit more in our container-diff tutorial. Fortunately, where there’s a need, there’s a tool. But change is inevitable, and while commits on Dockerfiles are easy to control, the impact of those changes on the resulting image are not. We know that an innocent-looking change can have branching, hard-to-debug consequences. Touching a working Dockerfile can feel like playing with fire.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |