The Alert Distribution system Dockerfile (currently in lsst-dm/alert_stream, but see DM-19584) uses a git clone to pull in the contents of lsst-dm/sample-avro-alert.
By default, Docker caches the results of previous executions of this command. In other words, if the following happens:
- User runs docker build in lsst-dm/alert stream;
- User pushes updates to lsst-dm/sample-avro-alert;
- User runs docker build in lsst-dm/alert stream
then the user will end up with the old (ie, pre-update) contents of sample-avro-alert in their freshly built Docker image. That is, at best, confusing.
A workaround is to use --no-cache in the docker build command line. However, the real problem here is that this is abusing the Dockerfile: it's supposed to give a reproducible build environment, but we are trying to use it to track a moving Git repository. We should reconsider this approach.