To be able to create and publish docker images we need to use a Docker Registry.
By default Jenkins X ships with a Docker Registry which is included in the system namespace for Jenkins X along with Jenkins and Nexus. Since this docker registry is running inside your kubernetes cluster and is used internally inside your cluster its hard to expose it via HTTPS with self signed certificates - so we default to using insecure docker registries for the IP range of service IPs in your kubernetes cluster.
Using a different Docker Registry
If you are using the public cloud you may wish to take advantage of your cloud providers docker registry; or reuse your own existing docker registry.
If you are using Static Jenkins Master
To specify the Docker Registry host/port you can use the Jenkins Console:
Then navigate to Manage Jenkins -> Configure System and change the DOCKER_REGISTRY environment variable to point to your docker registry of choice.
Another approach is to add the following to your values.yaml file for your customisation of the Jenkins X platform helm charts:
Using the jFrog BinTray as a private registry is possible. This has only been tested when creating a new cluster and passing the --docker-registry=private-reg.bintray.io. After creating your cluster, you will want to do the following:
Delete the existing Secret called jenkins-docker-cfg by executing
kubectl delete secret jenkins-docker-cfg
Create a local file called config.json and its value should be in this format (update values based on your registry user account and FQDN).