script to build image