Passing credentials inside docker container in the form of a wrapper as an env variable

  devops, docker, dockerfile

In my dockerfile:::-

   ENTRYPOINT exec java $JAVA_OPTS -jar /apps/service.jar$env$configRepo$password$username 

I have removed the $username and $password in ENV instruction in my dockerfile but still the same credentials are required to pass inside the ENTRYPOINT instruction but I dont have these credentials anymore in my dockerfile file.

Question: Is there a safer way to use those credentials in ENTRYPOINT at run-time?
Do I need to create a wrapper script and call that wrapper at run-time? How can I add these git logins to a wrapper script so that the script can be called at run-time?

I need to use credentials as env at run-time.

Source: Docker Questions