Path: blob/main/components/image-builder-bob/README.md
2492 views
Introduction to image-builder-bob
Overview
Bob is a CLI responsible for building and pushing workspace images during workspace startup.
For each image build, a headless workspace gets created in the workspace cluster by image-builder-mk3
in this headless workspace runs:
bob proxy
, which gets started by workspacekit in ring1, and receives credentials for pushing images to a docker registry. It proxies and authenticates the image pushes frombob build
.bob build
as a workspace task, which builds thebase layer, if a custom Dockerfile is specified in
.gitpod.yaml
. If this base image has already been built for the workspace, this step is skipped, and the reference of the previously built image is used instead to build the workspace image next.workspace image, which using crane to copy the image from the base layer, where the base layer is either a previously built custom Dockerfile or a public image. These images get pushed over
localhost
tobob proxy
, asbob build
does not receive the credentials to push to private registries.
The built images do not include e.g.
supervisor
or the IDE, these layers will get added byregistry-facade
during image pull.
How to try locally
Prerequisite: make sure you have buildkit in the path
Set things up
Build and run
Run tests
Required Permssion
If you want it to work in a particular public cloud, you may need to grant some permissions. Below is a reference for this.
AWS
If you would like to use ECR as a container registry, please add the following IAM policy below. Also, if you want to use ECR as public, you should add ecr-public
too.