def METHOD_NAME(rule_runner_args: dict) -> None:
    class GenerateOriginTarget(TargetGenerator):
        alias = "docker_image_generator"
        generated_target_cls = DockerImageTarget
        core_fields = ()
        copied_fields = ()
        moved_fields = ()
    class GenerateDockerImageTargetFromOrigin(GenerateTargetsRequest):
        generate_from = GenerateOriginTarget
    @rule
    async def generate_docker_image_rule(
        request: GenerateDockerImageTargetFromOrigin, union_membership: UnionMembership
    ) -> GeneratedTargets:
        return GeneratedTargets(
            request.generator,
            [
                DockerImageTarget(
                    {
                        "instructions": DOCKERFILE.strip().split("\n"),
                    },
                    request.template_address.create_generated("generated-image"),
                    union_membership,
                )
            ],
        )
    rule_runner_args["rules"].extend(
        [
            generate_docker_image_rule,
            UnionRule(GenerateTargetsRequest, GenerateDockerImageTargetFromOrigin),
        ]
    )
    rule_runner_args["target_types"].append(GenerateOriginTarget)