Module-2 Building Docker Image on windows for .NET api
ranaakl opened this issue · 1 comments
Hello,
I am getting below error after I run the following command
"docker build . -t REPLACE_ME_AWS_ACCOUNT_ID.dkr.ecr.REPLACE_ME_REGION.amazonaws.com/mythicalmysfits/service:latest " on windows server 2019 on the Windows PowerShell for AWS.
Note: I have tried to replace the line "RUN dotnet publish -c Release -r linux-musl-x64 -o out" in the the DockerFile to "RUN dotnet publish -c Release -o out" but still giving same error.
Error:
Step 5/11 : FROM microsoft/dotnet:2.1-runtime-deps-alpine
2.1-runtime-deps-alpine: Pulling from microsoft/dotnet
image operating system "linux" cannot be used on this platform
You have to switch your docker containers to linux containers.
Locate Docker Desktop icon in your systray, open context menu (probably right click), select "Switch to Linux containers..."