How to use the dazel.DockerInstance.from_config function in dazel

To help you get started, we’ve selected a few dazel examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nadirizr / dazel / dazel.py View on Github external
def main():
    # Read the configuration either from .dazelrc or from the environment.
    di = DockerInstance.from_config()

    # If there is no .dazel_run file, or it is too old, start the DockerInstance.
    if (not os.path.exists(di.dazel_run_file) or
        not di.is_running() or
        (os.path.exists(di.dockerfile) and
         os.path.getctime(di.dockerfile) > os.path.getctime(di.dazel_run_file))):
        rc = di.start()
        if rc:
            return rc

    # Forward the command line arguments to the container.
    return di.send_command(sys.argv[1:])

dazel

Run bazel in Docker, in a reproducible and portable container.

MIT
Latest version published 1 year ago

Package Health Score

56 / 100
Full package analysis