ripe-gigabyte-88964
11/21/2023, 4:20 PMdocker_image target or to derive a docker_environment from a docker_image target?late-keyboard-89314
11/21/2023, 4:41 PMdocker_environment with an image field that matches the repository/tag generated by a docker_image and then including the image target itself in runtime_package_dependencies of my python_tests target, which is environment aware.ripe-gigabyte-88964
11/21/2023, 5:06 PMlate-keyboard-89314
11/21/2023, 5:08 PMripe-gigabyte-88964
11/21/2023, 5:10 PMrepository:tag? I'm getting access deniedlate-keyboard-89314
11/21/2023, 5:11 PMlate-keyboard-89314
11/21/2023, 5:50 PMruntime_package_dependencies does trigger a build of the image target, but only after the environment has tried to pull it. So on the first run, it’ll fail because you haven’t run pants package yet. This also means unbeknownst to me that my test runs have always been an image version behind. In my case, it’s not a big deal because I don’t change this container often enough to have noticed and I must have just always run package first.
The other catch is that you must use a tag for your image that isn’t latest since Docker will attempt to pull that tag even if the image already exists locally.
https://gist.github.com/jcrumb-u21/5b032cd7b5431a9dd43267f4d1d2adeblate-keyboard-89314
11/21/2023, 5:51 PMpants package :: as a smoke test, so I’ve never noted the ordering issue wrt runtime_package_dependencies