I'm using Molecule to test some Ansible roles. I would like to push some files to the docker image used for testing. For that purpose, I put my test file in the molecule folder and ADD/COPY commands are added to the Dockerfile.j2 file. My folder structure looks like this:
- ansible-role-foo/
- molecule/
- default/
- Dockerfile.j2
- myTestFile.txt
- ...
The Dockerfile.j2:
# Molecule managed
...
RUN mkdir -p /my/path
COPY myTestFile.txt /my/path
When lauching molecule --debug converge
, I get the following error:
COPY failed: stat /var/lib/docker/tmp/docker-builder266739241/myTestFile.txt: no such file or directory
I'm using molecule 2.18.1.
How to correctly include myTestFile.txt in the docker image, in the context of molecule?