Possible to pull/merge multiple Docker images?

All,

First, I’m a very basic Docker person. So it’s possible this is a dumb question and I just don’t know how to phrase it. I’ve followed along some Docker tutorials and I’ve happily been using my own custom Docker images with CircleCI happily and all is well. But in making more complex CI, there was a thought that it would be nice to not just build in our CI (which is what I’m mainly doing), but also run some commands in the CI as well. But to do so, we need some extra data (boundary conditions, etc.)

Now, one way I thought of doing this was taking my current CI image and then making a new image from that, copying the data into that, and then I pull that image. And that does work, but I wondered if I could have a better “separation of concerns”. That is, our “data image”, for lack of a better phrase, might evolve faster than our main CI image. I would be nice if all we had to do to update the data is just update the “data image” in our config.yml and we have it but not need to roll out a new custom image that is the “sum” of both.

So, I tried that with:

version: 2.1

jobs:
  build:
    docker:
      - image: gmao/ubuntu20-geos-env:v6.2.8-intelmpi_2021.3.0-intel_2021.3.0
        auth:
          username: $DOCKERHUB_USER
          password: $DOCKERHUB_AUTH_TOKEN
      - image: gmao/geos-bcs:v10.19.4
        auth:
          username: $DOCKERHUB_USER
          password: $DOCKERHUB_AUTH_TOKEN
    steps:
      - checkout
      - run: ls /

Now if just have the first image (my “main” image that has all the OS etc) all is happy and the ls / shows me what I expect from that image.

But once I add the second image, I see both pulled during the “Spin up environment” step, then the next step just says “Container: gmao/geos-bcs:v10.19.4” and inside is:

Build was canceled

Then the CI moves on and in the last step, ls / I don’t see the extra directory I’m hoping would come with the data image.

So, is this possible? Or do I just need to go back to the make a new custom image that is a combination of both process?