Docker .bashrc service HTTP request fail

I wanted to run some services automatically in the startup, inside a docker container. SO I added the relevant commands to .bashrc in order to execute those services. And they are running as expected but one service which involved in sending HTTP requests to the localhost, fails to send the request to the server. But once I logged in to the docker container and execute the script manually through shell, it works properly. Looking forward your suggestions and answers.

Dockerfile

P.S. I have tried adding those commands in to .profile as well. But got the same outcome.

.bashrc and .profile is used for user env not to start application.
Create a startup script and use it as the entry point.

I added a startup script “bootstrap” to the /home/cobweb/bootstrap folder location. Then chmod +x the executable file. Now I’m getting the following error:

System error: exec: "/home/cobweb/bootstrap": permission denied