How to edit a file in a running container?

Does the service has a “build:” setting in you docker-compose.yml? If it doesn’t, then there is no way it could know how to build the image, would it?