I managed to replicate my development environment using
docker-compose in circleci using a
docker/docker-compose image. It really works great
version: 2 jobs: build: docker: # using custom image, see .circleci/images/primary/Dockerfile - image: docker/compose:1.16.1 working_directory: ~/tfm environment: TEST_RESULTS: /tmp/test-results steps: - checkout - setup_remote_docker - run: name: Build docker-compose containers command: | docker-compose build - run: name: Start containers command: | docker-compose up -d - run: name: Verify it's working command: | docker-compose run app ./script.sh
But I have hit a wall when trying to execute a script inside one of the containers.
I have tried running a command using
docker-compose.yml specifying the
command option for a specific container using
But I get the follwing error:
ERROR: Cannot start service app: oci runtime error: container_linux.go:265: starting container process caused "exec: \"./script.sh\": stat ./script.sh: no such file or directory"
If I try running the script in
.circleci/config.yml (as in the code above)
- run: name: Verify it's working command: | docker-compose run app ./script.sh
I still get the same error (even when I specify the full path to the script).
Any ideas on how to execute a script inside a container using