Reputation: 6302
I am unable to create DockerFile in Powershell. The command I am using is:
FROM mcr.microsoft.com/dotnet/aspnet:3.1
The error I am getting is:
The 'from' keyword is not supported in this version of the language.
You can clearly see I am running the command from the app directory which is: "D:\Website\Project\Dockers\App".
I am following the official microsoft docs for it. The link is here.
I have dockers desktop installed in running. It is running in Linux Containers mode.
What is wrong, something missing?
Upvotes: 0
Views: 163
Reputation: 174660
PowerShell is not Docker, and PowerShell won't be able to parse or understand docker commands.
If you want to write a dockerfile from PowerShell, do like you would to write any other text file:
"FROM mcr.microsoft.com/dotnet/aspnet:3.1" |Add-Content .\Dockerfile
Upvotes: 1