Skip to content
This repository has been archived by the owner on Jul 9, 2023. It is now read-only.

docker-compose up -d fails #9

Closed
roychowdhuryrohit-dev opened this issue Oct 24, 2019 · 4 comments
Closed

docker-compose up -d fails #9

roychowdhuryrohit-dev opened this issue Oct 24, 2019 · 4 comments

Comments

@roychowdhuryrohit-dev
Copy link

Error -

Couldn't connect to Docker daemon at http+docker://localhost - is it running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.

@IzioDev
Copy link

IzioDev commented Nov 14, 2019

I have the same issue here using the gitlab-ci, here's my file:

test_autoresponder:
  stage: test
  only:
    refs:
      - merge_requests
    changes:
      - stacks/autoresponder/**/*
  image:
    name: tiangolo/docker-with-compose:latest
  services:
    - docker:dind
  script:
    - docker-compose -p test -f docker-compose.test.yml up -d

I even tried with sudo before the docker-compose command, but it didn't help.

@Antonboom
Copy link

+1

Running with gitlab-runner 12.2.0 (a987417a)
   on go_libs_tiv_runner06 KRdrmSKp
Using Docker executor with image tiangolo/docker-with-compose ...

 + docker-compose down --rmi local --volumes --remove-orphans --timeout 60

 Couldn't connect to Docker daemon at http://docker:2375 - is it running?
 If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.
 ERROR: Job failed: exit code 1

@tiangolo
Copy link
Owner

Your container should have access to the Docker daemon, for that, mount the Docker sock as a volume.

I think this post might help too: https://medium.com/better-programming/about-var-run-docker-sock-3bfd276e12fd

@github-actions
Copy link

Assuming the original issue was solved, it will be automatically closed now.

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

No branches or pull requests

4 participants