Hi Rahul Mishra,
Thank you for reaching out to us on the Microsoft Q&A forum.
Based on the description for creating a Dockerfile to deploy an Angular application, you need to use a Node.js image as the base image. Below is a sample Dockerfile for your reference please replace the instruction values with your own data.
FROM ubuntu:20.04 AS build
RUN git clone <code_url> && cd /directory
COPY package.json package-lock.json ./
RUN npm install
RUN npm run build --prod
FROM nginx:alpine
COPY --from=build /app/dist/your-app-name /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
Once the docker file is created to build and push the docker image run the following commands.
docker build -t <imge_name> .
docker tag <imge_name> your-registry-name/<new-imge_name>:<tag_name>
docker push your-registry-name/<new-imge_name>:<tag_name>
Once the docker image is created and pushed to docker registry, to deploy that image to azure conainer instance run the below command.
az container create \
--resource-group <your-resource-group> \
--name <your-container-name> \
--image < your-registry-name/<new-imge_name>:<tag_name > \
--cpu 1 --memory 1.5 --ports 80
If the information is helpful, please consider by clicking the " Accept answer and Upvote " on the post.