Accelerate build of application in Docker container via CircleCI

I have an application which is built in a Docker container. The build of the Docker container is done via CircleCI.
I am wondering:

  • is there a solution to cache the dependencies of the application in
    Docker container?
  • is there a working solution to cache Docker images in CircleCI? https://circleci.com/docs/docker/#caching-docker-layers
    seems as not a very clean solution

As a temporary solution, I am using a “base image” where software dependencies for my application are stored (Java, Maven, etc.). I am not sure, that it is good to put all the Maven dependencies to my “base image” because dependencies are changing.

  • Apache, PHP, WordPress caching issue in Docker container
  • Nginx content caching causing Docker memory spike
  • Exec is not supported by the lxc driver: how to get around this?
  • Does any CI service let you build Docker containers and use the docker build cache?
  • How to “add” the proxy section to configure a registry as a pull-through cache?
  • docker-compose keeps using old image content
  • Can't build docker package (docker-git) with makepkg
  • CoreOS: fleetctl status shows service inactive, while container is up
  • maven builds fails inside ubuntu vagrant machine as well as docker instance
  • How to set hwaddr in docker 0.9.x
  • Docker using gosu vs USER
  • Docker - Should my MySQL database live inside or outside the container?
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.