News for hackers. Stuff that matters.
Re:Keeping Up with Docker Official Images by terom on Tuesday June 08, 2021 @04:23PM (#27440271)
The neat way to re-run a layer daily is to use a build arg:

  FROM debian
  
  ARG APT_UPDATE_DATE
  RUN apt-get update && apt-get upgrade -y
Then `docker build --build-arg APT_UPDATE_DATE=$(date +%Y%m%d)` will always re-run the `apt-get update` for the first build each day. You probably also want `--pull`.

There are no comments on this comment yet.