Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework developers images to make them compatible with Red Hat internal image build tool (aka brew) #20858

Closed
l0rd opened this issue Dec 1, 2021 · 8 comments
Assignees
Labels
area/ci CI build and releases, PR testing, & whitelabel/productization issues area/getting-started Issues related to the getting started samples https://www.eclipse.org/che/getting-started/cloud/ area/plugins kind/enhancement A feature request - must adhere to the feature request template. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. severity/P1 Has a major impact to usage or development of the system.

Comments

@l0rd
Copy link
Contributor

l0rd commented Dec 1, 2021

Is your enhancement related to a problem? Please describe

Che samples devfiles use the universal developer image. The image is built with 2 Dockerfiles (base, universal) that have invalid instructions for Red Hat CI:

  • RUN curl instructions are not possible (what if the dependency gets removed from the website? Brew builds are offline, with no direct internet access to fetch tarballs, zips, go/node/pip dependencies, etc.)
  • Heredocs in Dockerfiles may not be supported

Describe the solution you'd like

  1. remove heredocs in Dockerfiles, since current dockerfiles use a mix of both heredoc and && syntax already
  2. add a get-sources.sh script that pre-downloads assets into the local folder and renames them to asset-* - see examples in https://github.com/redhat-developer/codeready-workspaces-images/
  3. replace RUN curl with COPY asset-* instructions
  4. extract hardcoded versions nested in heredoc scripts to a list of ENVs near the top of the file, so they're easier to keep current
  5. remove hardcoded ARCH="linux_amd64", ARCH="x86_64-unknown-linux-musl", and ARCH="Linux-x86_64" declarations and compute these from uname -m (switching between x86_64 and amd64 as appropriate); this will allow multiarch builds in brew
  6. maintainer should be an actual person's name + email address (or comma-separated list of more than one), not just a company. See https://github.com/redhat-developer/codeready-workspaces-images/blob/crw-2-rhel-8/codeready-workspaces-idea/Dockerfile#L112
    6a) provide a transformation script that can remove registry references from FROM lines, leaving only FROM org/image:tag ... or FROM org/image@digest ...
    6b) if anything is being installed via RPM from EPEL or Fedora, provide .repo files to enable this installation that can be disabled downstream in Brew (not allowed) via the transformation script
@l0rd l0rd added the kind/enhancement A feature request - must adhere to the feature request template. label Dec 1, 2021
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Dec 1, 2021
@l0rd
Copy link
Contributor Author

l0rd commented Dec 1, 2021

@nickboldt is there something else apart RUN curl instructions that we should avoid in Dockerfiles (there is a separate issue for multi-arch support)? Do you know if brew supports heredocs like the following one in Dockerfiles?

RUN <<EOF
echo "Hello" >> /hello
echo "World!" >> /hello
EOF

@l0rd l0rd added area/ci CI build and releases, PR testing, & whitelabel/productization issues area/getting-started Issues related to the getting started samples https://www.eclipse.org/che/getting-started/cloud/ area/plugins severity/P1 Has a major impact to usage or development of the system. and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Dec 1, 2021
@nickboldt
Copy link
Contributor

@l0rd see https://issues.redhat.com/browse/CRW-2459 for future work to make it easier to consume CRW dockerfiles outside of brew process. That will give you some insights into what differences there are between public online dockerfiles and Brew internal offline dockerfiles.

the other thing we can now do in downstream vs. upstream is to use cachito to manage go, python, and node dependencies. See https://issues.redhat.com/browse/CRW-2444

@che-bot
Copy link
Contributor

che-bot commented Jul 4, 2022

Issues go stale after 180 days of inactivity. lifecycle/stale issues rot after an additional 7 days of inactivity and eventually close.

Mark the issue as fresh with /remove-lifecycle stale in a new comment.

If this issue is safe to close now please do so.

Moderators: Add lifecycle/frozen label to avoid stale mode.

@che-bot che-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 4, 2022
@l0rd
Copy link
Contributor Author

l0rd commented Jul 5, 2022

/remove-lifecycle stale

@che-bot che-bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 5, 2022
@che-bot
Copy link
Contributor

che-bot commented Jan 1, 2023

Issues go stale after 180 days of inactivity. lifecycle/stale issues rot after an additional 7 days of inactivity and eventually close.

Mark the issue as fresh with /remove-lifecycle stale in a new comment.

If this issue is safe to close now please do so.

Moderators: Add lifecycle/frozen label to avoid stale mode.

@che-bot che-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 1, 2023
@che-bot che-bot closed this as completed Jan 8, 2023
@l0rd l0rd reopened this Jan 27, 2023
@l0rd l0rd removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 27, 2023
@che-bot
Copy link
Contributor

che-bot commented Jul 26, 2023

Issues go stale after 180 days of inactivity. lifecycle/stale issues rot after an additional 7 days of inactivity and eventually close.

Mark the issue as fresh with /remove-lifecycle stale in a new comment.

If this issue is safe to close now please do so.

Moderators: Add lifecycle/frozen label to avoid stale mode.

@che-bot che-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 26, 2023
@che-bot che-bot closed this as completed Aug 2, 2023
@l0rd l0rd reopened this Sep 14, 2023
@l0rd l0rd removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 14, 2023
@l0rd l0rd self-assigned this Oct 2, 2023
@l0rd l0rd assigned AObuchow and unassigned l0rd Dec 7, 2023
@che-bot
Copy link
Contributor

che-bot commented Jun 4, 2024

Issues go stale after 180 days of inactivity. lifecycle/stale issues rot after an additional 7 days of inactivity and eventually close.

Mark the issue as fresh with /remove-lifecycle stale in a new comment.

If this issue is safe to close now please do so.

Moderators: Add lifecycle/frozen label to avoid stale mode.

@che-bot che-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 4, 2024
@AObuchow
Copy link

AObuchow commented Jun 4, 2024

/remove-lifecycle stale

@che-bot che-bot closed this as completed Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ci CI build and releases, PR testing, & whitelabel/productization issues area/getting-started Issues related to the getting started samples https://www.eclipse.org/che/getting-started/cloud/ area/plugins kind/enhancement A feature request - must adhere to the feature request template. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. severity/P1 Has a major impact to usage or development of the system.
Projects
None yet
Development

No branches or pull requests

4 participants