Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup Windows Dockerfile #41

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Cleanup Windows Dockerfile #41

wants to merge 7 commits into from

Conversation

julmb
Copy link

@julmb julmb commented Oct 15, 2021

This is based on PR #40.

The Dockerfile for the Windows Server 2022 image contains several lines that are not/no longer needed.

  1. As is, the PATH contains the PowerShell directory a whopping 3 times.
    PS C:\> $env:PATH
    C:\Program Files\PowerShell;C:\Windows\system32;C:\Windows;;C:\Program Files\PowerShell;;C:\Program Files\PowerShell
    It is probably safe to remove this (4f27d7c) and have the path in there only twice ;).
  2. I looked at the mentioned CMD in NanoServer Docker image is not compatible with non-default users PowerShell/PowerShell#6211 (comment) but could not figure out why this was needed before. Either way, it is recommended to use ContainerUser over ContainerAdministrator and the image works just fine if this line is dropped (f4b2646).
  3. As far as I know, the SHELL directive only affects Dockerfile commands using shell syntax. Seeing as there are none in this Dockerfile, the directive can be dropped (bcdd172).
  4. Finally, using unix paths gets rid of some escaping and makes paths easier to read (bfd80b0).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants