Squash did remove intermediate layer but last layer still stays (the one which was produced by Remove-Item command). Still don’t get it why Remove-Item adds to the image. Sizes are shown difference between previous layer and current layer not cumulative, so how exactly removing stuff from image can increase difference in size between 2 layers.
IMAGE CREATED CREATED BY
SIZE COMMENT
sha256:fcf216ef5a7f0c56d8b024f1a3136e0aff3dba211f4d6da824425f3601ead6c1 34 seconds ago
38 MB merge sha256:e9ab8109c03677ec0175815fddd451456621c14aea1d5e15fb42c5a03b13cbd5 to sha256:015cd665fbddf0784e31e24ab98acc1b0c81852
f26a05944060425db86ed9e49
<missing> 9 hours ago powershell -Command $ErrorActionPreference = 'Stop'; $ProgressPreferenc
e = 'Continue'; $verbosePreference='Continue'; remove-item $env:temp\* -Recurse -ErrorAction Ignore
0 B
<missing> 9 hours ago powershell -Command $ErrorActionPreference = 'Stop'; $ProgressPreferenc
e = 'Continue'; $verbosePreference='Continue'; #(nop) ADD tarsum.v1+sha256:46f032ba7011d11e506afa9b9583a8ac07f800ebba6cb2b361b7631a454b455e in .\iisadmin.exe
0 B
<missing> 9 hours ago powershell -Command $ErrorActionPreference = 'Stop'; $ProgressPreferenc
e = 'Continue'; $verbosePreference='Continue'; #(nop) SHELL [powershell -Command $ErrorActionPreference = 'Stop'; $ProgressPreference = 'Continue'; $verbosePreferen
ce='Continue';] 0 B
<missing> 3 days ago Install update 10.0.14393.1358
2.51 GB
<missing> 6 months ago Apply image 10.0.14393.0