Hi @ALPHA99 ,
A) Is the steps mentioned above the right way to execute the problem statement ?
- Add the terraform init, plan, apply operations in the CMD directives in your docker file.
B) How to create and what should , I store in the Docker Images ?
- To create docker file you will have to run
docker build -t <image-tag> /path/to/dockerfile
command, please refer to this link Docker build. - You can have a COPY for the terraform templates for your infrastructure in the docker file which should get stored in one of the image layers.
- It would be highly recommended not to store Azure credentials or any sensitive information in the docker image. You can instead pass them as environment variables.
C) How to create and what should , I store in the Docker Containers ?
- To create docker container , use the following code
docker run image
with appropriate options. - Containers should be preferably stateless in nature.
D) When Executing the Docker Container from Docker Desktop , How would the services get created and deployed ?
- The CMD instructions in the docker file, as mentioned previously would execute the terraform commands on container start. Please refer to CMD-docker-docs.
E) Suggest me on the ways I could implement the above problem statement and If not Why?
- Please follow the above instructions and you can also try referring to reference.
I hope this helps.
Please 'Accept as Answer' if the information provided was useful to help the community.