Simply build a docker images and run commands on the build image

Is it possible? I’m struggling hard on this issue.