check if the image is locally, otherwise pull it

With this change it will work similar to `docker run` command. 

If the image is not locally it will pull it.