Instructions

Converting an image

Prerequisites

  • Have Docker installed and Docker service available. If you don't have Docker installed follow these instructions
  • Gvmkit-build installed (see instructions)
info

You can use npx and pipx tools to run gvmkit-build without installation.

Introduction

Golem images are based on Docker images, which means that it is required to have a Docker image to be able to convert it to a Golem image. We will include a simple Dockerfile just to show how the tool and its commands work for demonstration purposes, and you are free to create your own Dockerfile.

Building your Docker image

Create a Dockerfile file with the following content:

FROM debian:latest
VOLUME /golem/input /golem/output
WORKDIR /golem/work

Now build a Docker image tagged golem-example using the above Dockerfile.

docker build . -t golem-example

Converting Docker image to a Golem image

The examples below show how to convert the Docker image tagged golem-example to a .gvmi file in the current directory.

gvmkit-build golem-example

or if you do not have gvmkit-build installed:

npx gvmkit-build golem-example

Converting and publishing your image at once (hash-based)

This example explains how to convert and publish an image that will be identified by its hash. The examples assume you have a Docker image tagged golem-example already created.

Note if the image was already converted to .gvmi format, it will only be pushed.

gvmkit-build golem-example --push --nologin

or if you do not have gvmkit-build installed:

npx gvmkit-build golem-example --push --nologin

The hash is found in the image link line of the console output:

 -- image link (for use in SDK): 99e40c2168cef0231dde2ed7ed74ebb607f25d8ed4bf9fe537f8da7b