drone-git
drone-git copied to clipboard
Cleanup Windows Dockerfile
This is based on PR #40.
The Dockerfile for the Windows Server 2022 image contains several lines that are not/no longer needed.
- As is, the
PATHcontains the PowerShell directory a whopping 3 times.
It is probably safe to remove this (4f27d7ccce337b41b79b16f2fe51c15e3aac390d) and have the path in there only twice ;).PS C:\> $env:PATH C:\Program Files\PowerShell;C:\Windows\system32;C:\Windows;;C:\Program Files\PowerShell;;C:\Program Files\PowerShell - I looked at the mentioned https://github.com/PowerShell/PowerShell/issues/6211#issuecomment-367477137 but could not figure out why this was needed before. Either way, it is recommended to use
ContainerUseroverContainerAdministratorand the image works just fine if this line is dropped (f4b2646e4b97ff5891a31c654913f089b968519d). - As far as I know, the
SHELLdirective only affects Dockerfile commands using shell syntax. Seeing as there are none in this Dockerfile, the directive can be dropped (bcdd1728a83732680c620d4829a2cc7e050fdfb8). - Finally, using unix paths gets rid of some escaping and makes paths easier to read (bfd80b0ffd8088319b66f4461394b2a95c515607).