1. 7
  1.  

  2. 1

    The reason why this is bad is because a line with only apt-get update will get cached by the build and won’t actually run every time you need to run apt-get install.

    I actually find this to be useful when developing Dockerfiles, so that I can leverage the cache while figuring out all of the packages to install. Once I get the list complete though, I’ll typically clean it up and put them all on the same line.