Updated Docker image tags to use multi-line syntax for better readability and added latest tag conditionally.