From 3eb85164ede4cc63991d02dbd5cf16d14b5835af Mon Sep 17 00:00:00 2001 From: Kevin Su Date: Fri, 16 Jun 2023 01:00:31 -0700 Subject: [PATCH] Doc for pushing image to local registry Signed-off-by: Kevin Su --- cookbook/core/image_spec/image_spec.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cookbook/core/image_spec/image_spec.py b/cookbook/core/image_spec/image_spec.py index a57f157ee..0dfa0688c 100644 --- a/cookbook/core/image_spec/image_spec.py +++ b/cookbook/core/image_spec/image_spec.py @@ -125,3 +125,13 @@ def wf(): # # pyflyte build --remote image_spec.py wf # + +# %% +# To push the image to the local registry in the sandbox, the configuration of buildkitd needs to be changed. you can follow the steps below: +# +# 1. Stop existing buildkitd if it is running. ``docker stop buildkitd-demo`` +# 2. Get the local registry IP address. ``docker inspect flyte-sandbox | grep IPAddress`` +# 3. Start buildkitd with the new configuration. ``envd bootstrap --registry 172.17.0.2:30000 --use-http`` +# 4. Replace the ``registry`` field in the ``ImageSpec`` with the local registry IP address. +# 5. Run ``pyflyte build --remote image_spec.py wf`` to build the image and push it to the local registry. +#