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

docs: add GAR #184

Merged
merged 1 commit into from
Oct 2, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions implementors.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ See [OCI Artifacts][artifacts] for how to add OCI Artifacts support to your regi
- [docker/distribution](#docker-distribution) - local/offline verification
- [Azure Container Registry](#azure-container-registry-acr)
- [Amazon Elastic Container Registry](#amazon-elastic-container-registry-ecr)
- [Google Artifact Registry](#google-artifact-registry-gar)

## Artifact Types Using ORAS

Expand Down Expand Up @@ -234,6 +235,28 @@ ACR Artifact Documentation: [aka.ms/acr/artifacts](https://aka.ms/acr/artifacts)
--media-type application/vnd.unknown.layer.v1+txt
```

### [Google Artifact Registry (GAR)](https://cloud.google.com/artifact-registry)

- Authenticating with GAR using the gcloud command-line tool

```sh
gcloud auth configure-docker ${REGION}-docker.pkg.dev
```

- Pushing Artifacts to GAR

```sh
oras push ${REGION}-docker.pkg.dev/${GCP_PROJECT}/samples/artifact:1.0 \
./artifact.txt:application/vnd.unknown.layer.v1+txt
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jonjohnsonjr @jdolitsky
Google Artifact Registry does not support config as /dev/null, right?
I tested json, yaml and plain text, thease worked.
Should I add a comment for that specification?

$ oras push ${REGION}-docker.pkg.dev/${GCP_PROJECT}/samples/artifact:1.1 \
>     --manifest-config /dev/null:application/vnd.unknown.config.v1+json \
>     ./artifact.txt:application/vnd.unknown.layer.v1+txt
Uploading fe1c9c56450d artifact.txt
Error: failed commit on ref "unknown-sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855": unexpected status: 400 Bad Request

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason for hiding this comment

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

This REQUIRED property references a configuration object for a container, by digest. Beyond the descriptor requirements, ...

From the descriptor requirements:

The following fields contain the primary properties that constitute a Descriptor:

mediaType string

This REQUIRED property contains the media type of the referenced content. Values MUST comply with RFC 6838, including the naming requirements in its section 4.2.

The OCI image specification defines several of its own MIME types for resources defined in the specification.

digest string

This REQUIRED property is the digest of the targeted content, conforming to the requirements outlined in Digests. Retrieved content SHOULD be verified against this digest when consumed via untrusted sources.

size int64

This REQUIRED property specifies the size, in bytes, of the raw content. This property exists so that a client will have an expected size for the content before processing. If the length of the retrieved content does not match the specified length, the content SHOULD NOT be trusted.

As such, this section of the oras description seems to be out of compliance with the spec, from my reading:

Since oras does not make use of the configuration object, an empty JSON object {} is used by default when pushing, and never being fetched when pulling.

```

- Pulling Artifacts from GAR

```sh
oras pull ${REGION}-docker.pkg.dev/${GCP_PROJECT}/samples/artifact:1.0 \
--media-type application/vnd.unknown.layer.v1+txt
```

## Adding Your Registry or Artifact Type

Do you support [OCI Artifacts][artifacts] and would like your registry and/or project listed here? Please [submit a PR](https://github.com/deislabs/oras/pulls), using similar formatting above. We're happy to promote all usage, as well as feedback.
Expand Down