In the Docker container, we need to be able to exec into it and view the application code and Dockerfile, but I want to set up a password for the users to restrict access

This is not possible. This topic has been discussed a couple of times. The forum search should have found at least this topic.