This is a docker, docker-compose and django project.
Locally, it works when I run
docker-compose build
docker-compose run --rm app sh -c "python manage.py test"
However, it failed when I run
circleci local execute
The error I get is
docker-compose build
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.
Error:
Exited with code exit status 1
Here's the .circleci/config.yml.
version: 2
jobs:
build:
docker:
- image: circleci/python:3.8.5
working_directory: ~/app
steps:
- checkout
- setup_remote_docker:
docker_layer_caching: true
- run:
command: |
docker-compose build
- run:
command: |
docker-compose run --rm app sh -c "python manage.py test"
I was using travisci and it just works with the .travis.yml config file below:
language: python
python:
- "3.8"
services:
- docker
before_script: pip install docker-compose
script:
- docker-compose run app sh -c "python manage.py test"
Would appreciate some pointers here. Thank you.