stencila/dockta

Clarify stateful #dockter comment

Opened this issue · 1 comments

The README says:

Dockter does this by looking for a special # dockter comment in a Dockerfile. Instead of throwing away layers, it executes all instructions after this comment in the same layer - thus reusing packages that were previously installed.

This explanation was a bit difficult to understand, as I thought it was an alternate implementation of the --squash option. That would create a new single layer in which to execute all images, but a new one for each build. This instead will reuse an existing layer, overwriting the contents.

Some thoughts to polish this feature:

  • # dockter does not convey the meaning of this, a more specific annotation like # dockter: stateful could make it easier to search for documentation about this option
  • clarify in README this is going to overwrite an existing, single layer
  • clarify where this state is kept, in the Docker daemon's state files, I guess
  • clarify rolling back to a previous version of the dependencies will be slower as the trade-off, having to modify the existing, single layer

@giorgiosironi : thanks for the great suggestions! I've added this issue to the 1.0.0 milestone.