4.What is the difference between docker exec and attach?
Docker exec command is used to access the contents of a container and runs the commands inside the container.
Docker attach command is used to attach our terminal to a running container to view it’s working.