Some Docker containers are perfect for CircleCI 2.0. Postgresql, for instance, spins up everything you need just by passing in a few variables:
version: 2.0 jobs: build: docker: - image: clojure:alpine - image: postgres:9.6 environment: POSTGRES_USER: username POSTGRES_DB: db ...
But sometimes you’ll come across a third party container which doesn’t play so nice. You’ll need access to some resources which are present inside the container and nowhere else. The issue you’ll run into is that CircleCI makes your execution environment your primary image. So above, while I have access to the ports which are exposed by Postgres,
psql isn’t in my
$PATH. Only the contents of Clojure’s Alpine container are.