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

Use Universal Developer Image as dev container #246

Closed
wants to merge 30 commits into from

Conversation

vitaliy-guliy
Copy link
Contributor

@vitaliy-guliy vitaliy-guliy commented Jun 22, 2023

What does this PR do?

  • Inherits che-code-dev image from Universal Developer Image
  • Adds few commands to build che-code image with podman

What issues does this PR fix?

eclipse-che/che#22292

How to test this PR?

Do following:

Should have like following:

Screenshot from 2023-06-26 17-50-43

Screenshot from 2023-06-26 17-49-35


Note that:

  • all the 30 commits will be squashed when merging. I haven't squashed them here because of 1) all the commits to the branch were performed using online che-code, as for me the squashing it not clear UX flow; 2) do not want to add an extra commit as it triggers the github PR checks

  • at the moment, quay.io/che-incubator-pull-requests/che-code-dev:pr-246-dev-amd64 is used as a dev image. I plan to update it after merging of this pull request and when the corresponding che-dev image will be built by the appropriate github action.

@github-actions
Copy link

github-actions bot commented Jun 22, 2023

Click here to review and test in web IDE: Contribute

@vitaliy-guliy vitaliy-guliy marked this pull request as ready for review June 22, 2023 21:06
@vitaliy-guliy vitaliy-guliy marked this pull request as draft June 23, 2023 12:25
@github-actions

This comment was marked as outdated.

1 similar comment
@github-actions

This comment was marked as outdated.

@vitaliy-guliy vitaliy-guliy changed the title [WIP] Use Universal Developer Image as dev container Use Universal Developer Image as dev container Jun 26, 2023
@vitaliy-guliy
Copy link
Contributor Author

There is one thing that needs to be fixed - is optimize the dev image as its size a bit huge

$ docker images
REPOSITORY                                  TAG                  IMAGE ID       CREATED         SIZE
quay.io/vgulyy/che-code-dev                 next-udi             7610232c9b24   25 hours ago    9.63GB

@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@@ -6,81 +6,49 @@
# SPDX-License-Identifier: EPL-2.0
#

# https://quay.io/eclipse/che-machine-exec#^7\.
FROM quay.io/eclipse/che-machine-exec:7.56.0 as machine-exec
FROM quay.io/devfile/universal-developer-image:latest
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

universal-developer-image has a lot of tools, but as result it has a huge image size
is it really required to have all those tools from the universal-developer-image for the che-code development?
can we just add required tools to the dev image?

just for my understanding, as you are working on it and you know the problem better then me...

Copy link
Contributor Author

@vitaliy-guliy vitaliy-guliy Jun 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had some issues with configuring the podman in current che-dev image.
So, It was much easier to take the universal developer image and add missing libraries, required for building vscode.

@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

Copy link
Member

@azatsarynnyy azatsarynnyy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vitaliy-guliy I believe the GitHub Workflow-related changes deserve a separate PR. As they are not directly related to the current PR. However, the current PR depends on these changes. We can review/test the GitHub Workflow simplification separately.

@vitaliy-guliy
Copy link
Contributor Author

@vitaliy-guliy I believe the GitHub Workflow-related changes deserve a separate PR. As they are not directly related to the current PR. However, the current PR depends on these changes. We can review/test the GitHub Workflow simplification separately.

This pull request

  • introduces the changes into che-code-dev image
  • adapts pull request chesks to those changes.

Here I removed two existing jobs with messy logic (we discussed that) and added two separate independent jobs to build che-code and che-code-dev images.

docker buildx build \
--platform linux/amd64 \
--progress=plain \
-f build/dockerfiles/linux-libc.Dockerfile \
Copy link
Member

@azatsarynnyy azatsarynnyy Jun 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the help of matrix strategy, you can combine Compile linux-libc and Compile linux-musl steps into just a single step.

Copy link
Contributor Author

@vitaliy-guliy vitaliy-guliy Jun 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reworked it intentionaly to prevent storing somewhere (uploading artifacts) the result of two launches of the build job.
Now we do not store artifacts. Now we build libc and musl, then build che-code image, upload it to quay.io and forget.

@github-actions
Copy link

Pull Request Che-Code image published:
👉 quay.io/che-incubator-pull-requests/che-code:pr-246-amd64

@vitaliy-guliy vitaliy-guliy marked this pull request as ready for review June 29, 2023 13:50
@che-incubator che-incubator deleted a comment from github-actions bot Jun 29, 2023
@github-actions
Copy link

Pull Request Dev image published:
👉 quay.io/che-incubator-pull-requests/che-code-dev:pr-246-dev-amd64

@github-actions
Copy link

Pull Request Che-Code image published:
👉 quay.io/che-incubator-pull-requests/che-code:pr-246-amd64

@vitaliy-guliy
Copy link
Contributor Author

Superseded by #253

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants