How to i execute the command inside docker container using shell script?

Try wrapping your sudo lines with single ticks.