Project

Profile

Help

Story #5785

Ansible Plugin - Story #5517: [EPIC] Automation Hub Release Blockers

Add Endpoint that builds image from a docker file

Added by bmbouter 3 months ago. Updated 22 days ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Sprint/Milestone:
Start date:
Due date:
% Done:

100%

Platform Release:
Blocks Release:
Backwards Incompatible:
No
Groomed:
Yes
Sprint Candidate:
No
Tags:
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:
Sprint 63

Description

It would be very useful to be able to hand a docker file to pulp_container and have it build the image in a task and create the Content Units in Pulp.


Related issues

Blocked by Container Support - Story #5816: As a user, I can sync OCI content CLOSED - CURRENTRELEASE Actions

Associated revisions

Revision bd534141 View on GitHub
Added by dkliban@redhat.com about 1 month ago

Adds REST API to build OCI image from Containerfile

closes: #5785 https://pulp.plan.io/issues/5785

Revision bd534141 View on GitHub
Added by dkliban@redhat.com about 1 month ago

Adds REST API to build OCI image from Containerfile

closes: #5785 https://pulp.plan.io/issues/5785

History

#1 Updated by dkliban@redhat.com 3 months ago

We should use buildah to build these images. The instructions for using the buildah CLI to build an image from a Dockerfile are here[0]. We should add a View that accepts the Dockerfile and a repository. This view needs to be dispatch a task with the Dockerfile and repository as the parameters. This task should use subprocess to call into buildah to create an image. The manifest and blobs that are created need to be saved as content in Pulp and then associated with the latest version of the repository.

[0] https://github.com/containers/buildah/blob/master/docs/tutorials/01-intro.md#using-dockerfiles-with-buildah

#2 Updated by bmbouter 3 months ago

  • Parent task set to #5517

#3 Updated by ipanova@redhat.com 3 months ago

wrote:

We should use buildah to build these images. The instructions for using the buildah CLI to build an image from a Dockerfile are here[0]. We should add a View that accepts the Dockerfile and a repository. This view needs to be dispatch a task with the Dockerfile and repository as the parameters. This task should use subprocess to call into buildah to create an image. The manifest and blobs that are created need to be saved as content in Pulp and then associated with the latest version of the repository.

[0] https://github.com/containers/buildah/blob/master/docs/tutorials/01-intro.md#using-dockerfiles-with-buildah

This effort is blocked until we add support for OCI image format. As it is stated in the Buildah docs, it produces an OCI image from the provided dockerfile.

For the Viewset i suggest we add 'tag'(optional) so when the image is being built and then added to the repo, it can also carry its tag if one was provided.

#4 Updated by dkliban@redhat.com 3 months ago

@ipanova, I agree that this is blocked until we add OCI support to pulp_container. Though I don't think that will be a lot of work. I'll open a 2 separate issue for adding OCI support: one for updating sync code and another one for updating the content app. Only the latter one is actually blocking for this story.

#5 Updated by ipanova@redhat.com 3 months ago

wrote:

@ipanova, I agree that this is blocked until we add OCI support to pulp_container. Though I don't think that will be a lot of work. I'll open a 2 separate issue for adding OCI support: one for updating sync code and another one for updating the content app. Only the latter one is actually blocking for this story.

I agree, however I would keep this effort tracked in 1 issue, that will take care of updating the code everything is needed so end-to-end usecase with OCI is supported ( models, sync, content app, schema converter)

Since this story will take care of saving the artifacts( created by buildah) and creating content units in pulp, it will depend on the changes not only in content app but also on changes in models.

#6 Updated by ipanova@redhat.com 3 months ago

  • Blocked by Story #5816: As a user, I can sync OCI content added

#7 Updated by ipanova@redhat.com 3 months ago

  • Groomed changed from No to Yes
  • Sprint set to Sprint 62

#8 Updated by ipanova@redhat.com 3 months ago

  • Tracker changed from Issue to Story
  • % Done set to 0

#9 Updated by rchan 3 months ago

  • Sprint changed from Sprint 62 to Sprint 63

#10 Updated by dkliban@redhat.com 2 months ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to dkliban@redhat.com

I've opened a PR with the initial implemetnation: https://github.com/pulp/pulp_container/pull/41/

#11 Updated by dkliban@redhat.com about 1 month ago

  • Status changed from ASSIGNED to POST

#12 Updated by dkliban@redhat.com about 1 month ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100

#13 Updated by ipanova@redhat.com 22 days ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

#14 Updated by ipanova@redhat.com 22 days ago

  • Sprint/Milestone set to 1.1.0

Please register to edit this issue

Also available in: Atom PDF