
Because Nexus is running a http connection, we have to configure an insecure registry.

Note: daemon.json is a configuration file used by docker daemon to specify various settings to customize the behavior and functionality of docker daemon according to your specific needs
Step 1: Configure Daemon.json file

Step 2: Include insecure registries configuraion using the docker-hosted repository ip address and port

Step 3: Restart docker so that the changes can get applied.

Step 4: start jenkins container

Step 5: Reconfigure permission to the docker.sock file

Note: we have reconfigured docker to allow accessing nexus and allowing our docker repository on nexus as an insecure connection.
We will now reconfigure Jenkins job and set it up to push to our docker repo on nexus instead of docker hub