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.

  • Prevent docker from creating image from cache
  • Is it possible to use a Dockerfile not named “Dockerfile” with CircleCI?
  • CircleCI: MySQL starts on its own even after stopping the process
  • Connect to Docker Swarm for Continuous deploy
  • Implications of exposing /var/lib/docker over NFS to serve hosts with limited memory
  • how to clear cache memory inside docker container
  • Docker-compose: deploying service in multiple hosts
  • Vagrant box and Docker provider: Titan and Kafka
  • Using Docker, with Selenium and Pytest to run parallel tests
  • What does Docker Quickstart Terminal do?
  • How to pass an ARG to a Dockerfile in a docker-compose.yml
  • how to run a daemon process in docker container with API/v1.5?
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.