Docker bind code to container

I need to bind the source code to a docker container, I use the following to run a container as I have also a volume to get the output data.

docker run -it  -v ${PWD}/output:/output  --name container_name  img

I think there is a practical way instead of rebuilding the image after updating the code.