This project puts Cayley in scratch docker container. It is available on Docker Hub and can be pulled using the following command.
docker pull alectolytic/cayley
You will note that this is a tiny image.
$ docker images | grep docker.io/alectolytic/cayley
docker.io/alectolytic/cayley latest 9f8c078ba15a 17 minutes ago 13.34 MB
In this example we deploy cayley with data persisted via a data container and mongo db as a backend.
# create data container
docker create --entrypoint=_ -v /data -v /data/db -v /log --name cayley-data scratch
# start mongo container
docker run -d --volumes-from cayley-data --name cayley-mongo mongo
# initialize database
docker run --rm -it --name cayley \
--volumes-from cayley-data \
--link cayley-mongo:mongo \
alectolytic/cayley init \
-db="mongo" -dbpath="mongo:27017"
# start cayley as required
docker run -d --name cayley -p 64210:64210 \
--volumes-from cayley-data \
--link cayley-mongo:mongo \
alectolytic/cayley http -host="0.0.0.0" \
-db="mongo" -dbpath="mongo:27017"
You can start or stop cayley using the following command.
# Starting
docker start cayley-mongo cayley
# stopping
docker stop cayley cayley-mongo
You can access data from the data container using any container of your choice.
# using alpine (tiny busybox)
docker run --rm -it --volumes-from cayley-data alpine sh
# using fedora
docker run --rm -it --volumes-from cayley-data fedora:latest bash
make
docker run --rm -it alectolytic/cayley -help
docker run -d -name cayley -p 64210:64210 \
-v /path/to/cayley.cfg:/cayley.cfg \
alectolytic/cayley http -config="/cayley.cfg"
# start mongo container
docker run -d --name cayley-mongo mongo
# start cayley
docker run -d -name cayley -p 64210:64210 \
--link cayley-mongo:mongo \
alectolytic/cayley http -host="0.0.0.0" \
-db="mongo" -dbpath="mongo:27017"
docker run --rm -it -p 64210:64210 \
-v /path/to/data:/data \
alectolytic/cayley http -host="0.0.0.0" \
-db="memstore" -dbpath="/data/30kmoviedata.nq" -logtostderr=true
Content type
Image
Digest
sha256:391521cac…
Size
14 MB
Last updated
almost 11 years ago
docker pull alectolytic/cayley