@@ -725,6 +725,7 @@ async def _build_image_from_remote_dockerfile(
725725 dockerfile ,
726726 platform : str ,
727727 remote_full_context : bool ,
728+ expected_context_fingerprint : Optional [str ],
728729 image_init : Optional [Union [SandboxImageInitDict , SandboxImageInit ]],
729730 image_config_user : Optional [str ],
730731 builder_cpus : Optional [int ],
@@ -741,6 +742,7 @@ async def _build_image_from_remote_dockerfile(
741742 context_path ,
742743 dockerfile = dockerfile ,
743744 force_full_context = remote_full_context ,
745+ expected_context_fingerprint = expected_context_fingerprint ,
744746 temp_dir = temp_dir ,
745747 )
746748 build_id = None
@@ -803,6 +805,7 @@ async def build_image_from_dockerfile(
803805 dockerfile = "Dockerfile" ,
804806 remote : bool = True ,
805807 remote_full_context : bool = False ,
808+ expected_context_fingerprint : Optional [str ] = None ,
806809 docker_tag : Optional [str ] = None ,
807810 platform : str = IMAGE_BUILD_SOURCE_PLATFORM ,
808811 build_args : Optional [Dict [str , str ]] = None ,
@@ -829,6 +832,7 @@ async def build_image_from_dockerfile(
829832 dockerfile = dockerfile ,
830833 platform = platform ,
831834 remote_full_context = remote_full_context ,
835+ expected_context_fingerprint = expected_context_fingerprint ,
832836 image_init = image_init ,
833837 image_config_user = image_config_user ,
834838 builder_cpus = builder_cpus ,
@@ -840,6 +844,8 @@ async def build_image_from_dockerfile(
840844 temp_dir = temp_dir ,
841845 upload_timeout = upload_timeout ,
842846 )
847+ if expected_context_fingerprint is not None :
848+ raise ValueError ("expected_context_fingerprint requires remote=True" )
843849 tag = docker_tag or make_temp_docker_tag ()
844850 remove_tag = docker_tag is None
845851 try :
0 commit comments