INNER CODE UNIT · Python

_docker_build_command

omnirexflora-labs/omnicoreagent · src/omnicoreagent/serve/cli.py:511

def _docker_build_command(dockerfile_path: Path, project_root: Path) -> str:
    """Return a build command that uses the generated Dockerfile."""
    try:
        relative_dockerfile = dockerfile_path.resolve().relative_to(
            project_root.resolve()
        )
    except ValueError:
        return f"docker build -f {dockerfile_path} -t omnicoreagent-serve ."

    if relative_dockerfile == Path("Dockerfile"):
        return "docker build -t omnicoreagent-serve ."
    return f"docker build -f {relative_dockerfile.as_posix()} -t omnicoreagent-serve ."


@cli.command("generate-dockerfile")
@click.option(
    "--file",
    "-f",

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…