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

Improve documentation for --publish flag #1994

Closed
mgreen-sm opened this issue Nov 28, 2023 · 4 comments · Fixed by #2024
Closed

Improve documentation for --publish flag #1994

mgreen-sm opened this issue Nov 28, 2023 · 4 comments · Fixed by #2024
Assignees
Labels
documentation good first issue A good first issue to get started with. status/ready Issue ready to be worked on.

Comments

@mgreen-sm
Copy link

Description

As a new user to Buildpacks, I found the documentation / help on the build --publish flag to be sparse. As a result, I was not fully aware of its function ("how to use it" and "what is it for"). The documentation / help merely states: "Publish to registry".

This confused me, because the documentation / help also speaks of registry for multiple other options (config registry-mirror, config registries and also provides limited information about the --publish flag for other options (builder create --publish, buildpack package --publish).

Aside from being accustomed to push instead of publish (Docker), I had related the build --publish with the other options (resorting to an extra docker push .... step in the pipeline).

Only in the documentation itself, in the "App Developer Guide: Cache Images" section specifically, was it made clear that the build --publish would push the image the registry specified as part of the image name, and that it had no relation to other options (or would be published publicly somewhere not intended).

Proposed solution

Use similar wording as in the Docker documentation to clarify the purpose of build --publish:

Use (--publish) to share your images to the Docker Hub registry or to a self-hosted one.

Refer to the image tag reference for more information about valid image and tag names.

This should answer both the "what is it for" and "how to use it".

The last line in the example above ("Refer to ...") may also apply to the --cache-image option, so could be consolidated in the help / documentation as with Docker's documentation.

Additionally, expand the "App Developer Guide" to include an example similar to the "Cache Images" section.

Additional context

@mgreen-sm mgreen-sm added status/triage Issue or PR that requires contributor attention. type/enhancement Issue that requests a new feature or improvement. labels Nov 28, 2023
@jjbustamante jjbustamante added documentation status/ready Issue ready to be worked on. good first issue A good first issue to get started with. and removed type/enhancement Issue that requests a new feature or improvement. status/triage Issue or PR that requires contributor attention. labels Dec 1, 2023
@h4l0gen
Copy link

h4l0gen commented Dec 4, 2023

hey @mgreen-sm , i would like to work on this issue . could you please help me out to work on this , Thanks

@cmoulliard
Copy link

Documentation should also better explain how to set the credentials to publish the image created within the registry: quay.io, docker.io etc and how to get a more verbose message instead of

export CNB_REGISTRY_AUTH=/Users/cmoullia/.docker/config.json
pack builder create -v quay.io/swowdrop/ubi-builder --config ubi-builder.toml --publish
...
Adding extension paketo-community/[email protected] (diffID=sha256:71b958166ca5b4fdec5734dd34a3175bef471f91a4c50d9664b43f4014ea6a56)
ERROR: failed to write image to the following tags: [quay.io/swowdrop/ubi-builder: HEAD https://quay.io/v2/swowdrop/ubi-builder/manifests/latest: unexpected status code 401 Unauthorized (HEAD responses have no body, use GET for details)]

@rizul2108
Copy link
Contributor

rizul2108 commented Jan 10, 2024

I want to work on this issue. Can any maintainer please assign this issue to me ?
@natalieparellano

@rizul2108
Copy link
Contributor

Additionally, expand the "App Developer Guide" to include an example similar to the "Cache Images" section.

does this mean I have to add an example demonstrating how to use publish flag to push to a registry?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation good first issue A good first issue to get started with. status/ready Issue ready to be worked on.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants