Skip to content

proposal: Load image from file #958

@wtraylor

Description

@wtraylor

The Problem

A reproducible project should be self-contained, that is contain all files and dependencies necessary to re-execute it.

For that reason I would like to include my Docker image file in the repository. I don’t want to rely on Docker Hub as an external dependency.

Currently, Popper allows me to specify a custom Dockerfile, but that in turn inevitably relies on a base layer from a Docker registry like Docker Hub.

My Current Workaround

I save my base image to a file and add it with Git-LFS to the repo:

docker image save debian:stable-20201012-slim --output image.tar
gzip image.tar
git lfs track '*.tar.gz'
git add image.tar.gz

Then I load the image in the first step of the Popper workflow:

steps:
- uses: "sh"
  runs: ["docker"]
  args: ["image", "load",  "--input", "image.tar.gz"]

That fails if Popper runs itself in a container (see #956).

Suggestion

Allow a file in the uses: field like this:

steps:
- uses: "image.tar.gz"
  runs: ["echo"]
  args: ["Hello World!"]

For Singularity it is natural to load an image from file, and Docker provides docker image load. However, I don’t know how easy it would be to run Singularity from a Docker image file or vice versa.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions