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

[release/2.7] Adding deprecated schema v1 page #2987

Merged
merged 1 commit into from Sep 3, 2019

Conversation

adrian-plata
Copy link
Contributor

No description provided.

@GordonTheTurtle
Copy link

Please sign your commits following these rules:
https://github.com/moby/moby/blob/master/CONTRIBUTING.md#sign-your-work
The easiest way to do this is to amend the last commit:

$ git clone -b "release/2.7" git@github.com:adrian-plata/distribution.git somewhere
$ cd somewhere
$ git rebase -i HEAD~842359065760
editor opens
change each 'pick' to 'edit'
save the file and quit
$ git commit --amend -s --no-edit
$ git rebase --continue # and repeat the amend for each commit
$ git push -f

Amending updates the existing PR. You DO NOT need to open a new one.

@adrian-plata
Copy link
Contributor Author

@thaJeztah, @andrewhsu, and @tonistiigi PTAL. Are there any additional things to add to this list?

---

Updating an image manifest from schema 1 to schema 2 is done by downloading an
image, applying schema v2, and then uploading the new image. However, this will
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would mention that it can be done by downloading the manifest, converting to schema 2, then uploading. Or simply by doing a docker pull then docker push.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

something like "Updating an image manifest from schema 1 to schema 2 is done by downloading the manifest, convert it from schema 1 to schema 2, and then uploading it.

You can also run docker pull and then docker push. This will update the
image to schema 2. "?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having a practical example of how to do this would be good yes. Something like;

The easiest way to upgrade an image from image manifest version 2, schema 1 to image manifest version 2, schema 2 is to docker pull the image, and docker push the image with a current version of Docker. Doing so will automatically convert the image to use the latest specification.

We may want to add a note/warning that that doesn't upgrade outdated images (which may container vulnerabilities). Something along the lines of;

Note: converting an image to image manifest version 2, schema 2 converts the manifest
format, but does not update the contents of the image itself. Images using manifest version 2, schema 1
are likely created a long time ago and may contain unpatched vulnerabilities.
We recommend looking for an alternative image or, if this is an image you maintain, rebuilding the image.
To update an image, and patch vulnerabilities, the image has to be re-built using an up-to-date base
image. Refer to the update FROM statement section below for more details.

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some thoughts/suggestions

@@ -0,0 +1,19 @@
---
title: Update deprecated schema v1 images
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we make this Update deprecated image manifest version 2, schema 1 images to schema 2 ?

keywords: registry, on-prem, images, tags, repository, distribution, api, advanced, manifest
---

Updating an image manifest from schema 1 to schema 2 is done by downloading an
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel there's something missing on this page (some introduction sentence explaining that image manifest v2, schema 1 is deprecated.

@dmcgowan should there be a deprecation note on https://github.com/docker/distribution/blob/master/docs/spec/manifest-v2-1.md ?

---

Updating an image manifest from schema 1 to schema 2 is done by downloading an
image, applying schema v2, and then uploading the new image. However, this will
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having a practical example of how to do this would be good yes. Something like;

The easiest way to upgrade an image from image manifest version 2, schema 1 to image manifest version 2, schema 2 is to docker pull the image, and docker push the image with a current version of Docker. Doing so will automatically convert the image to use the latest specification.

We may want to add a note/warning that that doesn't upgrade outdated images (which may container vulnerabilities). Something along the lines of;

Note: converting an image to image manifest version 2, schema 2 converts the manifest
format, but does not update the contents of the image itself. Images using manifest version 2, schema 1
are likely created a long time ago and may contain unpatched vulnerabilities.
We recommend looking for an alternative image or, if this is an image you maintain, rebuilding the image.
To update an image, and patch vulnerabilities, the image has to be re-built using an up-to-date base
image. Refer to the update FROM statement section below for more details.

docs/spec/deprecated-schema-v1.md Show resolved Hide resolved
Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

but perhaps @dmcgowan can fact-check the correct naming of the schemas

docs/spec/deprecated-schema-v1.md Outdated Show resolved Hide resolved
@dmcgowan dmcgowan changed the title Adding deprecated schema v1 page [release/2.7] Adding deprecated schema v1 page Sep 3, 2019
Signed-off-by: Adrian Plata <adrian.plata@docker.com>
(cherry picked from commit 07a5020)
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
Copy link
Collaborator

@dmcgowan dmcgowan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dmcgowan
Copy link
Collaborator

dmcgowan commented Sep 3, 2019

vndr and static checking need to be fixed, can be done separately

@dmcgowan dmcgowan merged commit 269d18d into distribution:release/2.7 Sep 3, 2019
@andrewhsu
Copy link
Contributor

For use in moby/moby#39736

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 this pull request may close these issues.

None yet

5 participants