Error while building worker image from example voting app

I am getting below error while building worker image from example voting app. I am on Ubuntu 20.04.4 LTS.

root@ubuntu2004:/home/ubuntu/study/docker/example-voting-app/worker# docker build . -t worker
Sending build context to Docker daemon 10.24kB
Step 1/13 : FROM --platform=${BUILDPLATFORM} mcr.microsoft.com/dotnet/sdk:7.0 as build
failed to parse platform : “” is an invalid component of “”: platform specifier component must match"^[A-Za-z0-9_-]+$": invalid argument

Can someone please help.

Hello ahens000,
Use the content of this Dockerfile and it will work fine https://github.com/mmumshad/example-voting-app/blob/master/worker/Dockerfile

I tried mentioned Dockerfile, still facing the issue

root@ubuntu2004:/home/ubuntu/study/docker/example-voting-app/worker# docker build . -t worker
Sending build context to Docker daemon  9.216kB
Step 1/10 : FROM mcr.microsoft.com/dotnet/core/sdk:3.1 as builder
 ---> 1e8401d05dea
Step 2/10 : WORKDIR /Worker
 ---> Using cache
 ---> 365dea41dc8d
Step 3/10 : COPY src/Worker/Worker.csproj .
COPY failed: file not found in build context or excluded by .dockerignore: stat src/Worker/Worker.csproj: file does not exist

try to remove the example-voting-app directory, and check the steps in the attached gif

git clone https://github.com/mmumshad/example-voting-app
cd example-voting-app/worker/
docker build . -t worker

docker-build