Closed Bug 1080955 Opened 8 years ago Closed 8 years ago

version-control-tools create-test-environment always reports "Docker is not available!"


(MozReview Graveyard :: General, defect)

Not set


(Not tracked)



(Reporter: mcote, Assigned: gps)



(1 file)

I've run ./create-test-environment on both Ubuntu and OS X several times and always get the "Docker is not available!" error, even when I have docker installed (on Ubuntu (in a VM), I ran "apt-get install" and on OS X "brew install docker").

I've attached the output as run on OS X.  If there's something other than those packages that I need (I haven't used docker much), please add it to the README.
set -e bites again.

I made the error non-fatal and added some instructions to point you to the install docs.

My guess is it isn't detecting your Docker because your user doesn't have permission to use Docker. There's room to make this detection and error message better. Let's keep this bug open until you are happy.
Assignee: nobody → gps
I followed the instructions at and verified that "docker version" works, although I need to set DOCKER_HOST first.  create-test-environment fails at the same place.  Running that command manually, I get

$ DOCKER_STATE_FILE=.docker-state.json testing/ build-bmo
Traceback (most recent call last):
  File "testing/", line 12, in <module>
    from vcttesting.docker import Docker
  File "/Users/mcote/projects/version-control-tools/testing/vcttesting/", line 10, in <module>
    import docker
ImportError: No module named docker
If you `source venv/bin/activate` and then run the command manually, that ImportError should go away.

If that doesn't work, the logic at will need supplemented to work on Ubuntu.

The Jenkins VM (testing/jenkins) is using Ubuntu and it "just works." Although, it's installing Docker from the Docker Apt repository, not the default Ubuntu one. Maybe the non-Ubuntu package is doing something different?
This is all on OS X btw.

Aha, I ran it again, after I had done the exported the DOCKER_HOST env var, and it completed successfully.  I'm running the tests now.

$ ./
WARNING: Not running tests optimally. Specify -j to run tests in parallel.
Building Docker image bmodb-volatile
Building Docker image bmoweb
Skipped test-case-only-rename.t: irrelevant
# Ran 34 tests, 1 skipped, 0 warned, 0 failed.
On OS X, I recommend running boot2docker. When you run `boot2docker up`, it will ensure your DOCKER_HOST environment is set correctly or print an export command you should run to ensure it is.

Not that things are working, should we close this bug?
Yeah I ran boot2docker, but I didn't realize I needed to run it in the same terminal (until I realized it was setting an environment variable).  So yeah, I think we can close this out.
Closing per last comment.
Closed: 8 years ago
Resolution: --- → FIXED
Version: Trunk → unspecified
Product: Developer Services → MozReview
You need to log in before you can comment on or make changes to this bug.