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

Load dependant tasks docker images #2

Open
La0 opened this issue Apr 11, 2019 · 1 comment
Open

Load dependant tasks docker images #2

La0 opened this issue Apr 11, 2019 · 1 comment

Comments

@La0
Copy link
Contributor

La0 commented Apr 11, 2019

taskboot need to support the following workflow:

  • Task A build a base docker image base
  • Task B & C each build an extended docker image using base : final-b and final-c
  • Task B & C depend on the completion of Task A to start
  • Task B & C publish the docker image as an artifact
    To build the final images, their task need to have the base image in the img local state.

So we should add the following logic:

  1. When we are on Taskcluster (env variable TASK_ID is set)
  2. We load the current task group definition
  3. Lookup potential dependencies for current task
  4. For each dependent tsk, list the artifacts
  5. If an artifact matches a naming convention (like public/taskboot/image*.tar) : it is then downloaded and loaded in our img current state

Blocker: img does not seem to currently support loading tar images (only pull from repositories) See genuinetools/img#226
Alternative: push to a docker repo using a custom tag in Task A, pull from task B/C and tag the image as the required FROM target

La0 pushed a commit that referenced this issue Apr 29, 2019
@jschwartzentruber
Copy link
Contributor

I've worked around the blocker you mentioned here: https://github.com/MozillaSecurity/orion/blob/master/services/orion-builder/src/orion_builder/stage_deps.py

I'm using the Docker registry binary from https://github.com/docker/distribution-library-image, using skopeo to load the image.tar into a registry on localhost, and then pulling from localhost to img

It needs improvement. I rely on the artifact name to match the image name, eg. foo.bar will be pulled to mozillasecurity/foo:latest, instead of reading the manifest to see what it contains.

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

No branches or pull requests

2 participants