docker-rebase: combine all ENV entries into one
First of all: great work! I was about to write my own script for collapsing image stacks, when I stumbled upon yours.
Since the Dockerfile specs let you combine as many ENV entries as you want in a single line, it would be quite nice when the script would perform this optimization (to get rid of all the 0-Byte dummy layers).
That is a good idea. Typically I only have one or two variables in my containers, but in the case where you have many this would be a nice enhancement.
Sorry I still haven't had a chance to test this yet. My main concerns is I want to make sure it doesn't introduce buffer overflows inside docker when parsing the container and if there are problems with special characters they in the environmental variable strings this does not aggravate that issue.