Ben Hernandez
Ben Hernandez

Reputation: 857

Docker-compose executions not cleaning up in Concourse

I have a single-vm deployment I am playing with using bosh (following these instructions: http://concourse-ci.org/concourse-lite.html)

After a bunch of builds, my pipeline errors with

/scratch/docker/tmp/GetImageBlob128904326: no space left on device

and on my mac, if I go into ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux

the Docker.qcow2 has pretty much grown to my max ~64gig

My pipeline is located at https://github.com/buildit/twig/blob/concourse/concourse/pipeline.yml

The only thing I can think of is that for my e2e tests, I am copying the docker files I use to spin up a docker-compose environment into each build so it doesn't go grab them by itself (see https://github.com/buildit/twig/blob/concourse/concourse/scripts/run_e2e_tests.sh) and perhaps those e2e environments are not being cleaned when the step fails (I am failing on purpose right now)

Is there a step I need to take to clean up these containers? I have 27 containers when I run fly -t lite volumes

Upvotes: 2

Views: 539

Answers (2)

Ben Hernandez
Ben Hernandez

Reputation: 857

I actually ended up fixing this by modifying my docker-compose file. It seems to me like the docker-compose down call wasn't finishing before the script ended so things were not getting cleaned up completely.

My test-runner is now configured like this

services:
  test-runner:
    ...
    depends_on:
      - e2e-couch
      - e2e-api
      - e2e-web
    ...

And I kick off the tests with docker-compose -f ./twig/concourse/compose/e2e.yml run --rm test-runner bash -c "cd /twig && npm install && npm run test:e2e:ci -- --base-href http://e2e-web" without bothering to do a docker-compose up beforehand. See original github links in the original question for more information.

Not sure why doing docker-compose down didn't clean them but this is working perfectly.

Upvotes: 0

gdenn
gdenn

Reputation: 511

Do you try to create a bosch environment within your docker container? We tried this as well and withdrawn the idea. If you want to test a bosh system, use a staging system rather than providing the testing environment in this case by Concourse.

Upvotes: 0

Related Questions