Mounting Files To Remote Docker

I need to add a couple of files into my remote docker instance, which works locally but doesn’t seem to to work on CircleCI.

I did some searching on here and this seems to have been a problem for years but there aren’t any solutions described (and a lot of the old docs that get linked to are now dead links).

This is the config in my docker-compose file that I need to get working:

    volumes:
      - ./DIR/FILE1:/DIR1/DIR2/DIR3/FILE1
      - ./DIR/FILE2:/DIR1/DIR2/DIR3/FILE2

Has anyone got similar config that runs, please?

Okay, so to update this, it’s a documented - if inexplicable - restriction of the docker executor that it can’t use docker compose volumes:

The workaround seems to be to use a machine executor instead. However when I try to do this I find that basically every single one of my commands is broken, and needs to be rewritten (you may be luckier).

I will look to see if there’s a feature request to add support for docker compose volumes in the docker executor, so I can enthusiastically endorse it.