How can I add file to image?

Hi everyone I want to run a docker image name docker pull codevohr/devops-202403-task-2 but whenever I try I have issue pops out which is
$docker run image name
Caused by: java.lang.RuntimeException: I need /opt/codevo_task2.txt file to run first ¯_(ツ)_/
I want to add file on this image but whenever I try it’s get same error
I have tried

docker run -d -v /root/codevo_task2.txt:/opt/codevo_task2.txt codevohr/devops-202403-task-2

still get same erro
Could someone help about this issue thanks :slight_smile:

If the file exists on your host at /root/codevo_task2.txt, i would expect it to work.
Have you checked permissions on the file?

1 Like