-
Task
-
Resolution: Unresolved
-
Major
-
2.13.0.GA
-
8
-
False
-
False
-
-
Prod #215 2022-02-23
If some CI wants to build the images, these CI may not have access to Red Hat internal repositories, or a developer may want to check if the image is building.
But today, there is a need to uncomment something in Dockerfile and we may not have access to the repositories added.
And sometimes it's not clear what to do:
and these repositories may not be accessible outside or Red Hat VPN
Sometimes the specified rpm is not available like in codeready-workspaces-stacks-golang
8 4.383 No match for argument: openshift-clients-4.9.0-202109101042.p0.git.96e95ce.assembly.stream.el8
8 4.390 Error: Unable to find a match: openshift-clients-4.9.0-202109101042.p0.git.96e95ce.assembly.stream.el8
These Dockerfiles also have
FROM ubi8-minimal:8.4-210
while building outside of brew we need to prefix it by registry.redhat.io
FROM registry.redhat.io/ubi8-minimal:8.4-210
So it would be great to have a generated, alternative Dockerfile for these cases like local.Dockerfile, with nothing to uncomment, nothing to replace,etc.
it should work out of the box to build the image.
REQUIREMENTS
- local.Dockerfile file must be generated at the same time as the brew-friendly Dockerfile in the root of crw-images/*/ folders (during sync.sh)
- script to convert Brew to local dockerfile (localize.sh?) should be in root of crw-images repo for reuse, rather than having the same code 31 times in 21 folders
- include a generic build.sh script that can be passed in the path to work folder (eg., ./build.sh -s codeready-workspaces-images/codeready-workspaces-plugin-java11)
- build.sh must check for podman and use that if found; fall back to docker if podman not installed
- build.sh must provide usage details w/ sample invocation
- https://github.com/redhat-developer/codeready-workspaces-images/blob/crw-2-rhel-8/README.building.md should be created and linked from README.md to explain how to use the localize.sh script, and then how to run a local build w/ the build.sh script
RULES for localize.sh
- use fully-qualified base image, including registry (ideally using non-auth'd one for easier build experience)
- special transformation rules may be required for rhel8 or ubi8 namespaced images
- apply all required content sets to allow rpm resolution
- all content_set*.repo files should be consistent
- content_set*.repo files where content is DISABLED should be removed and not copied during the Brew container builds (why bother if the repo is disabled?)
- https://github.com/redhat-developer/codeready-workspaces-images/blob/crw-2-rhel-8/codeready-workspaces-devfileregistry/build/dockerfiles/content_sets_rhel8.repo
- https://github.com/redhat-developer/codeready-workspaces-images/blob/crw-2-rhel-8/codeready-workspaces-pluginregistry/build/dockerfiles/content_sets_rhel8.repo
- for containers that install oc or helm, a workaround may be needed for when the version of rpm is not present on the public registry (vs. the internal RH pulp registry): remove hardcoded versions? search for an older/different version with https://github.com/redhat-developer/codeready-workspaces/blob/crw-2-rhel-8/product/getLatestRPM.sh ?
- blocks
-
RHDEVDOCS-3192 It is not possible to build che-plugin-registry for v2.9 (crw-2.9-rhel-8)
- Closed
- relates to
-
CRW-2275 Simplify registry customization process
- Closed
-
CRW-3156 Remove no-op scripts once Cachito migration is complete
- Open
- links to