Project

Profile

Help

Story #5785

closed

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

Add Endpoint that builds image from a docker file

Added by bmbouter about 5 years ago. Updated almost 5 years ago.

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

100%

Estimated time:
Platform Release:
Groomed:
Yes
Sprint Candidate:
No
Tags:
Sprint:
Sprint 63
Quarter:

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 contentCLOSED - CURRENTRELEASEipanova@redhat.com

Actions
Actions #1

Updated by dkliban@redhat.com about 5 years 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

Actions #2

Updated by bmbouter about 5 years ago

  • Parent issue set to #5517
Actions #3

Updated by ipanova@redhat.com about 5 years 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.

Actions #4

Updated by dkliban@redhat.com about 5 years 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.

Actions #5

Updated by ipanova@redhat.com about 5 years 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.

Actions #6

Updated by ipanova@redhat.com about 5 years ago

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

Updated by ipanova@redhat.com about 5 years ago

  • Groomed changed from No to Yes
  • Sprint set to Sprint 62
Actions #8

Updated by ipanova@redhat.com about 5 years ago

  • Tracker changed from Issue to Story
  • % Done set to 0
Actions #9

Updated by rchan about 5 years ago

  • Sprint changed from Sprint 62 to Sprint 63
Actions #10

Updated by dkliban@redhat.com about 5 years 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/

Actions #11

Updated by dkliban@redhat.com almost 5 years ago

  • Status changed from ASSIGNED to POST

Added by dkliban@redhat.com almost 5 years ago

Revision bd534141 | View on GitHub

Adds REST API to build OCI image from Containerfile

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

Added by dkliban@redhat.com almost 5 years ago

Revision bd534141 | View on GitHub

Adds REST API to build OCI image from Containerfile

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

Actions #12

Updated by dkliban@redhat.com almost 5 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100
Actions #13

Updated by ipanova@redhat.com almost 5 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Actions #14

Updated by ipanova@redhat.com almost 5 years ago

  • Sprint/Milestone set to 1.1.0

Also available in: Atom PDF