This repository holds ready-to-use Devfiles for different languages and technologies.
This repository contains a build.sh script at its root that can be used to build the registry:
Usage: ./build.sh [OPTIONS]
Options:
--help
Print this message.
--tag, -t [TAG]
Docker image tag to be used for image; default: 'nightly'
--registry, -r [REGISTRY]
Docker registry to be used for image; default 'quay.io'
--organization, -o [ORGANIZATION]
Docker image organization to be used for image; default: 'eclipse'
--offline
Build offline version of registry, with all artifacts included
cached in the registry; disabled by default.
--rhel
Build using the rhel.Dockerfile (UBI images) instead of default
By default, the built registry will be tagged quay.io/eclipse/che-devfile-registry:nightly, and will be built with offline mode disabled.
This script listens to the BUILDER variable, and will use the tool specified there to build the image. For example:
BUILDER=buildah ./build.shwill force the build to use buildah. If BUILDER is not specified, the script will try to use podman by default. If podman is not installed, then buildah will be chosen. If neither podman nor buildah are installed, the script will finally try to build with docker.
Note that the Dockerfiles in this repository utilize multi-stage builds, so Docker version 17.05 or higher is required.
Using the --offline option in build.sh will build the registry to contain zip files for all projects referenced, which is useful for running Che in clusters that may not have access to GitHub. When building the offline registry, the docker build will
- Clone all git projects referenced in devfiles, and
git archivethem in the/resourcespath, making them available to workspaces.
When deploying this offline registry, it is necessary to set the environment variable CHE_DEVFILE_REGISTRY_URL to the URL of the route/endpoint that exposes the devfile registry, as devfiles need to be rewritten to point to internally hosted zip files.
You can deploy the registry to Openshift as follows:
oc new-app -f deploy/openshift/che-devfile-registry.yaml \
-p IMAGE="quay.io/eclipse/che-devfile-registry" \
-p IMAGE_TAG="nightly" \
-p PULL_POLICY="Always"You can deploy Che devfile registry on Kubernetes using helm. For example if you want to deploy it in the namespace kube-che and you are using minikube you can use the following command.
NAMESPACE="kube-che"
DOMAIN="$(minikube ip).nip.io"
helm upgrade --install che-devfile-registry \
--debug \
--namespace ${NAMESPACE} \
--set global.ingressDomain=${DOMAIN} \
./deploy/kubernetes/che-devfile-registry/You can use the following command to uninstall it.
helm delete --purge che-devfile-registrydocker run -it --rm -p 8080:8080 quay.io/eclipse/che-devfile-registry:nightlyThe following CentOS CI jobs are associated with the repository:
master- builds CentOS images on each commit to themasterbranch and pushes them to quay.io.nightly- builds CentOS images and pushes them to quay.io on a daily basis from themasterbranch. Thenightlyversion of the devfile registry is used by default by thenightlyversion of the Eclipse Che, which is also built on a daily basis by theall-che-docker-images-nightlyCI job.release- builds CentOS and corresponding RHEL images from thereleasebranch. CentOS images are public and pushed to quay.io. RHEL images are also pushed to quay.io, but to the private repositories and then used by the "Hosted Che" devfile registry - https://che-devfile-registry.openshift.io/.release-preview- builds CentOS and corresponding RHEL images from therelease-previewbranch and automatically updates "Hosted Che" staging devfile registry deployment based on the new version of images - https://che-devfile-registry.prod-preview.openshift.io/. CentOS images are public and pushed to quay.io. RHEL images are also pushed to quay.io, but to the private repositories.
Che is open sourced under the Eclipse Public License 2.0.