I am trying to create a Jenkins pipeline that will pull a public image from docker hub and build a Vue.js application inside that container. In my Jenkins server I already have other pipelines that use AWS ECR to push images too. It appears that my build that is trying to access a public image is trying to log into AWS ECR as well. I'd be okay with putting that public image on ECR if that would solve my issue.
Here is the output of the failed Jenkins build
[Pipeline] withDockerRegistry $ docker login -u AWS -p ******** https://index.docker.io/v1/ WARNING! Using --password via the CLI is insecure. Use --password-stdin. Error response from daemon: Get https://registry-1.docker.io/v2/: unauthorized: incorrect username or password [Pipeline] // withDockerRegistry