Question about external volumes and docker-compose
tech4242 opened this issue · comments
Hi Stian,
currently trying to configure your image with Freebase and docker-compose (instead of your docker run cmds).
Ok, so my setup:
docker-compose
version: '2'
services:
web:
build: .
volumes:
- ./freebase:/freebase
ports:
- "80:80"
tty: true
where freebase is a folder in the project folder, which is in .dockerignore and which is mounted as a volume as you can see
Dockerfile
FROM stain/jena-fuseki
COPY ./deploy.sh ./deploy.sh
COPY ./entrypoint.sh ./entrypoint.sh
ENTRYPOINT ["/bin/sh", "entrypoint.sh"]
entrypoint.sh
#!/bin/sh
if [ -n "$(find freebase/ -prune -empty -type d 2>/dev/null)" ]
then
echo "Folder freebase is empty, start deployment."
sh ./deploy.sh
sh ./load.sh
else
sh ./load.sh
fi
deploy.sh
#!/bin/sh
echo "Starting download of Freebase"
wget http://commondatastorage.googleapis.com/freebase-public/rdf/freebase-rdf-latest.gz
echo "Extracting, this could take a while ..."
gunzip freebase-rdf-latest.gz
/jena-fuseki/tdbloader -loc /freebase/ freebase-rdf-latest
My problem is that my container is getting an exited with code 0
. Also did --verbose up but I am not getting anything useful (I think): compose.cli.verbose_proxy.proxy_callable: docker wait -> 0
is the last entry before the exit code 0. I don't have anything running on port 3030 and the rdf loading was successful.
I'm also not sure if the pattern matcher is finding /freebase, which is mounted as a volume by docker-compose.
Solved. Main problem was the entrypoint.sh
Hej-hej,
Main problem was the entrypoint.sh
and what have you solved exactly to get it run? Could you tell us more about the final solution?
Thank you