Publishing an image in the registry
You can use npx and pipx tools to run gvmkit-build without installation.
Once your image is built and tested you can push it to a remote repository so that it becomes available to providers within the Golem Network. Golem manages a freely-accessible repository that everybody can push into without any special requirements. You can identify your image by a
hash or by a
If you intend to use your image just for testing, it is enough to upload it anonymously and use its hash to identify it. On the other hand, if you plan to work on a more complex project where you would like to use several different versions of your image or collaborate with other users - you should consider creating an account in the registry and using tags to describe your images. Both cases are illustrated below.
Publishing a custom Golem image to the registry (hash-based)
If you have your
gvmi image built from a Docker image you can push it to the repository with the following command:
gvmkit-build --direct-file-upload <my-image-filename>.gvmi --push --nologin
After conversion, the resultant GVMI file is placed in the current working directory. By default, the image name is a Docker image name followed by a part of its
hash. When you push the GVMI image using this method you need to provide the name of the .gvmi file.
You can convert your Docker image and push the Golem image to the repository with one command:
gvmkit-build docker-image-name --push --nologin
Publishing a custom Golem image to the registry (tag-based)
Golem image tags have a format of
usernameis your login to the registry portal,
repository_nameis the name of your repository,
tagis the text that you chose to describe the content/version of the image. The
latestto constantly keep the latest version, or you can use a versioning system and e.g. make it
v0.0.1and so on.
Let's assume for this example your username is
golem, your Docker image is tagged
golem-example, your repository name is
my_example and the version is
- Create an account on the registry portal.
- Create a repository on the registry portal.
- Create and copy a personal access token from the registry portal.
- Run the following command (you will be asked for your login and personal access token)
gvmkit-build golem-example --push-to golem/my_example:latest
or if you do not have
npx gvmkit-build golem-example --push-to golem/my_example:latest
golem/my_example:latest is ready to use in one of Golem Network APIs
Was this helpful?