Build a Docker Image with a Maven settings.xml in it – Is it a Bad Practice?

  docker, maven

We have this use case where we want to run acceptance tests on our application with maven. For this we are looking into building our docker image with maven settings.xml copied into it. Obviously, the settings xml contains sensitive data about connection to remote artefact repos etc.
I am in a dilemma, whether we should copy it in the docker image, or is it a bad practice and we should be looking into other ways to achieve this.

Edit – Another point, our docker images are pushed to private registries which are accessible only to authorised users

Source: Docker Questions