Closed zengxc-1996 closed 3 years ago
docker-compose up -d
start error:
ERROR: for knowage Cannot start service knowage: OCI runtime create failed: invalid mount {Destination:[/home/knowage/apache-tomcat/resources] Type:bind Source:/var/lib/docker/volumes/6c3677804e0662777041a3354d3d260d4a29a2abf8811af788bcd1e6b6d8d821/_data Options:[rbind]}: mount destination [/home/knowage/apache-tomcat/resources] not absolute: unknown
ERROR: Encountered errors while bringing up the project.
Hi, could you please attach to this issue the original YAML file? In particular, we need to check the volumes section of the main container.
Trying with:
version: "3.1"
services:
knowage:
image: knowagelabs/knowage-server-docker:8.0.0-SNAPSHOT
depends_on:
- knowagedb
- knowagecache
- hazelcast
ports:
- "8080:8080"
networks:
- main
environment:
- DB_HOST=$DB_HOST
- DB_PORT=$DB_PORT
- DB_DB=$DB_DB
- DB_USER=$DB_USER
- DB_PASS=$DB_PASS
- CACHE_DB_HOST=$CACHE_DB_HOST
- CACHE_DB_PORT=$CACHE_DB_PORT
- CACHE_DB_DB=$CACHE_DB_DB
- CACHE_DB_USER=$CACHE_DB_USER
- CACHE_DB_PASS=$CACHE_DB_PASS
- HMAC_KEY=$HMAC_KEY
- PASSWORD_ENCRYPTION_SECRET=$PASSWORD_ENCRYPTION_SECRET
- PUBLIC_ADDRESS=localhost
- HAZELCAST_HOSTS=hazelcast
- HAZELCAST_PORT=5701
volumes:
- ./resources:/home/knowage/apache-tomcat/resources
Seems to work just fine.
I stumbled upon this issue too. I did git clone
this repository (commit c31b055260dbadc637ecb96760e48504563efce9).
I used this docker-compose file ./Knowage-Server-Docker/docker-compose.yml
. Then I extended it by these lines for the volume (as suggested):
volumes:
- ./resources:/home/knowage/apache-tomcat/resources
but I am still getting this ERROR:
ERROR: for knowage-server-docker_knowage_1 Cannot start service knowage: OCI runtime create failed: invalid mount {Destination:[/home/knowage/apache-tomcat/resources] Type:bind Source:/var/lib/docker/volumes/1e2b1917c0a45f9db3f53d86d9f914c6293d278d9872de94653a182b8a0aca12/_data Options:[rbind]}: mount destination [/home/knowage/apache-tomcat/resources] not absolute: unknown
docker inspect
shows:
"Mounts": [
{
"Type": "bind",
"Source": "/home/some/Knowage-Server-Docker/Knowage-Server-Docker/resources",
"Destination": "/home/knowage/apache-tomcat/resources",
"Mode": "rw",
"RW": true,
"Propagation": "rprivate"
},
{
"Type": "volume",
"Name": "1e2b1917c0a45f9db3f53d86d9f914c6293d278d9872de94653a182b8a0aca12",
"Source": "/var/lib/docker/volumes/1e2b1917c0a45f9db3f53d86d9f914c6293d278d9872de94653a182b8a0aca12/_data",
"Destination": "[/home/knowage/apache-tomcat/resources]",
"Driver": "local",
"Mode": "",
"RW": true,
"Propagation": ""
}
],
It looks like adding the volumes
in docker-compose added the Type: "bind"
item, but what about the Type: "volume"
item. i guess it get's created because of VOLUME [${TOMCAT_RESOURCES}]
in ./Knowage-Server-Docker/Dockerfile
?
I'm wondering if these brackets [
]
should be there in the "Destination": "[/home/knowage/apache-tomcat/resources]",
part
Looking at official documentation it seems correct. The VOLUME keyword declares a volume but doesn't affect the runtime, as far as I know.
After rechecking my opinion is that the VOLUME line might be missing quotes (
So, maybe it should be VOLUME ["${TOMCAT_RESOURCES}"]
instead of VOLUME [${TOMCAT_RESOURCES}]
i reproduced the same error message with this simple dockerfile:
FROM ubuntu:18.04
VOLUME [/tmp]
on my system and it disappeared when changing to
FROM ubuntu:18.04
VOLUME ["/tmp"]
After rechecking my opinion is that the VOLUME line might be missing quotes ( So, maybe it should be
VOLUME ["${TOMCAT_RESOURCES}"]
instead ofVOLUME [${TOMCAT_RESOURCES}]
i reproduced the same error message with this simple dockerfile:
FROM ubuntu:18.04 VOLUME [/tmp]
on my system and it disappeared when changing to
FROM ubuntu:18.04 VOLUME ["/tmp"]
Hi, I have just tried it, and you are right. I think it is the key to the problem.
Looking at official documentation it seems correct. The VOLUME keyword declares a volume but doesn't affect the runtime, as far as I know.
Hi, I hope you can modify the dockerfile as soon as possible. It's not working all the time, which makes me very upset.
If you have any other questions, please feel free to contact me.
Version 7.4.x is what I am using, please give priority to it, thank you.
I'm generating the 7.4.* images: it will take some times.
I'm generating the 7.4.* images: it will take some times.
Hi, Thank you for your help.
After that, I will try again.
Keep in touch, man.
All 7.4 images deployed. Could you please pull the images again and try it out?
I'm going to have a try now. Sorry for not replying in time because I was busy before.
Test results:
Man, good job. He looks great.
7.4:
7.4.6:
Great job @kerny3d
centos 7.x:
I tried to use all versions of 7.4.x with this error.
I ran it in the compose file.
Now I think there's something wrong with the mirror image.
I don't know how to deal with it. I am looking forward to your help. Thank you very much.