Story #5785
closedAnsible 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.
100%
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
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.
Updated by ipanova@redhat.com about 5 years ago
dkliban@redhat.com 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.
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.
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.
Updated by ipanova@redhat.com about 5 years ago
dkliban@redhat.com 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.
Updated by ipanova@redhat.com about 5 years ago
- Blocked by Story #5816: As a user, I can sync OCI content added
Updated by ipanova@redhat.com about 5 years ago
- Groomed changed from No to Yes
- Sprint set to Sprint 62
Updated by ipanova@redhat.com about 5 years ago
- Tracker changed from Issue to Story
- % Done set to 0
Updated by dkliban@redhat.com almost 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/
Updated by dkliban@redhat.com almost 5 years ago
- Status changed from ASSIGNED to POST
Added by dkliban@redhat.com almost 5 years ago
Added by dkliban@redhat.com almost 5 years ago
Revision bd534141 | View on GitHub
Adds REST API to build OCI image from Containerfile
Updated by dkliban@redhat.com almost 5 years ago
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
Applied in changeset bd534141894c33800f9596eb6f01c94c894aab1f.
Updated by ipanova@redhat.com almost 5 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Adds REST API to build OCI image from Containerfile
closes: #5785 https://pulp.plan.io/issues/5785