dotnet / dotnet-docker-nightly

This repository has moved to the nightly branch of dotnet/dotnet-docker.
https://github.com/dotnet/dotnet-docker/tree/nightly
MIT License
35 stars 30 forks source link

Set escape directive to backtick in Nano Server Dockerfiles. #453

Closed ravimeda closed 7 years ago

ravimeda commented 7 years ago

Steps to reproduce the issue

  1. Open a Dockerfile for Nano Server. For example, https://github.com/dotnet/dotnet-docker-nightly/blob/master/2.0/sdk/nanoserver/amd64/Dockerfile
  2. Observe that the escape directive is not specified. This means / (backslash) will be the default escape character.

Expected behavior

Use the escape directive, as suggested at (https://docs.docker.com/engine/reference/builder/#escape) to ` (backtick).

MichaelSimons commented 7 years ago

The motivation behind this change is coming from the upcoming Windows Server 1709 release. With this release the Nano Server image no longer includes PowerShell. As a result the current .NET Core Dockerfiles need to be refactored accordingly. These changes can be seen in the Dockerfiles for the Windows Insiders preview. With these changes, if the default escape directive is used (/), there is a case which needs to double escape the / which is pretty ugly and confusing. Switching to use the back tick is cleaner and easier to read/understand. It would be nice to have consistency across all of the .NET Core Nano Server Dockerfiles.

It is also important to note that the escape directive is scoped to the Dockerfile in which it is declared therefore this change will not have an impact on any Dockerfiles that use the .NET Core Docker images as their base image.

MichaelSimons commented 7 years ago

Issue moved to dotnet/dotnet-docker #311 via ZenHub