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

Question: diffs_ids and history #872

Closed
jpetazzo opened this issue Oct 9, 2021 · 1 comment · Fixed by #873
Closed

Question: diffs_ids and history #872

jpetazzo opened this issue Oct 9, 2021 · 1 comment · Fixed by #873

Comments

@jpetazzo
Copy link
Contributor

jpetazzo commented Oct 9, 2021

In the example in the spec, the rootfs field has a list of two diff_ids, but the history field has only one non-empty layer:

    "rootfs": {
      "diff_ids": [
        "sha256:c6f988f4874bb0add23a778f753c65efe992244e148a1d2ec2a8b664fb66bbd1",
        "sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef"
      ],
      "type": "layers"
    },
    "history": [
      {
        "created": "2015-10-31T22:22:54.690851953Z",
        "created_by": "/bin/sh -c #(nop) ADD file:a3bc1e842b69636f9df5256c49c5374fb4eef1e281fe3f282c65fb853ee171c5 in /"
      },
      {
        "created": "2015-10-31T22:22:55.613815829Z",
        "created_by": "/bin/sh -c #(nop) CMD [\"sh\"]",
        "empty_layer": true
      }

I had the impression that we would have diff_ids (content hashes) only for non-empty layers. Is this a small typo/mistake in the example, or did I miss something?

Thank you! ♥

@cyphar
Copy link
Member

cyphar commented Oct 9, 2021

Yeah I think that's a mistake in the example. empty_layer means there's no associated layer (so no diff_id). Maybe there should be another history entry afterwards in the example to make it (more) valid.

jpetazzo added a commit to jpetazzo/image-spec that referenced this issue Oct 13, 2021
jpetazzo added a commit to jpetazzo/image-spec that referenced this issue Oct 13, 2021
Fixes opencontainers#872

Signed-off-by: Jérôme Petazzoni <jerome.petazzoni@gmail.com>
sudo-bmitch pushed a commit to sudo-bmitch/image-spec that referenced this issue Sep 25, 2022
Fixes opencontainers#872

Signed-off-by: Jérôme Petazzoni <jerome.petazzoni@gmail.com>
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

Successfully merging a pull request may close this issue.

2 participants