简体   繁体   中英

Docker - Unable to mv a file inside a container

I am trying to give a set of bash instruction to my docker container when it launch. 这是我的 docker 文件,其中包含第 5 行的所有指令

but when I try to launch this docker file everything works great until the 'mv' command as you can see here : 码头工人错误告诉我它不是目录

but when I try to move the file directly from the container (the exact same command as my docker file) it works : 在此处输入图像描述

does anyone has an idea why its not working with the docker file instruction but working fine when I run the command manually ?

The directory /fuseky/configuration does not exist. In the container you are doing it the right way so just change the command in the dockerfile:

mv safetybimontology_reasoner.ttl /home/configuration

and you should be fine

I fixed the issue by adding the creation of the folder named /fuseki/configuration in the set of instruction. It works fine and I can see this log :

[2022-07-05 12:41:26] Config     INFO  Load configuration: file:///fuseki/configuration/safetybimontology_simple.ttl

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM