-
Notifications
You must be signed in to change notification settings - Fork 181
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
Enable CLI to Pull Config #274
Conversation
Signed-off-by: Shiwei Zhang <[email protected]>
Signed-off-by: Shiwei Zhang <[email protected]>
Signed-off-by: Shiwei Zhang <[email protected]>
What does passing the media-type do, though? What is the difference in behaviour between passing it or not? |
Of course, we can pull any configs but it requires the |
Sorry I couldn't review yesterday. Why should we have to specify the Repro steps
docker run -it --rm -p 5000:5000 registry
echo "hello config" > config.json
echo "hello artifact" > artifact.txt
oras push localhost:5000/hello-artifact:v1 \
--manifest-config config.json:application/vnd.acme.rocket.config \
./artifact.txt
mkdir download
cd download
oras pull localhost:5000/hello-artifact:v1 \
--manifest-config config.json ResultsOnly the ls
artifact.txt WorkaroundSpecify the config oras pull localhost:5000/hello-artifact:v1 \
--manifest-config config.json:application/vnd.acme.rocket.config ExpectationThe config is pulled, as the user shouldn't have to know the fully qualified URL and the config mediaType. The config mediaType is internal details |
Add a new option named
--manifest-config
tooras pull
so thatoras
can pull the config file as well even if the config is not named. Likeoras push
, file name with media type should be passed to the--manifest-config
option. The media type is optional and its default value isapplication/vnd.unknown.config.v1+json
. The resulted config will be written to the specified file name.Examples: