How to run codes inside a docker container

hey guys! I am new to docker and I am currently working on a lane line detections project using docker. I download an image that contains the environments I need to run my code and I created a container and mounted it to a local directory. I then copied my code to the local directory and ran my program on the terminal. But it always gave me errors. So I am wondering what is the correct way to use docker locally on a project.

Any comments will be appreciated!