Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_start_run_deps is broken due to changes in DockerInstance #44

Open
dor-zusman opened this issue Sep 2, 2018 · 1 comment
Open

_start_run_deps is broken due to changes in DockerInstance #44

dor-zusman opened this issue Sep 2, 2018 · 1 comment

Comments

@dor-zusman
Copy link

In previous commits a support for receiving (workspace_hex, delegated_volume, user) in __init__ was added to DockerInstance, while the instantiation code inside _start_run_deps does not pass these variables.
This in turn causes dazel installation to fail.
The relevant code is inside dazel.py:

class DockerInstance:
    """Manages communication and runs commands on associated docker container.
    A DockerInstance can build the image for the container if necessary, run it,
    set it up through configuration variables, and pass on commands to it.
    It streams the output directly and blocks until the command finishes.
    """

    def __init__(self, instance_name, image_name, run_command, docker_command, dockerfile,
                       repository, directory, command, volumes, ports, network,
                       run_deps, docker_compose_file, docker_compose_command,
                       docker_compose_project_name, docker_compose_services, bazel_user_output_root,
                       bazel_rc_file, docker_run_privileged, docker_machine, dazel_run_file,
                       workspace_hex, delegated_volume, user):

and

def _start_run_deps(self):
        """Starts the containers that are marked as runtime dependencies."""
        for (run_dep_image, run_dep_name) in self.run_deps:
            run_dep_instance = DockerInstance(
                instance_name=run_dep_name,
                image_name=run_dep_image,
                run_command=None,
                docker_command=None,
                dockerfile=None,
                repository=None,
                directory=None,
                command=None,
                volumes=None,
                ports=None,
                network=self.network,
                run_deps=None,
                docker_compose_file=None,
                docker_compose_command=None,
                docker_compose_project_name=None,
                docker_compose_services=None,
                bazel_rc_file=None,
                bazel_user_output_root=None,
                docker_run_privileged=self.docker_run_privileged,
                docker_machine=self.docker_machine,
                dazel_run_file=None)
@barakh
Copy link

barakh commented Jan 21, 2019

There is a workaround for that..

  1. Edit /usr/local/bin/dazel to use python3 instead of the deafult python(which is 2.7 for ubuntu):
    #!/usr/bin/python3
  2. Install docker compose - preventing the faulty flow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants