Open slackr opened 6 years ago
u have full docker version of bloodhound running? or just the neo4j? also looks like the example db needs to be moved to data/databases folder. Should be able to create a persistent volume for that db so bloodhound db doesnt wipe if the contianer gets wiped?
Hiyo!
A few quick thoughts!
Cheers!
@lostInSpaceSomewhere the docker image contains only neo4j and by default wont persist. I've found it useful for quick deployments of BH
im curious on the docker build
i have tried the following command with no success:
docker run -p 7474:7474 -p 7687:7687 specterops/bloodhound-neo4j -v ./logs:/var/lib/neo4j/logs -v ./db:/var/lib/neo4j/data/databases
error: /docker-entrypoint.sh: line 17: exec: -v: invalid option exec: usage: exec [-cl] [-a name] [command [arguments ...]] [redirection ...]
created two seperate volume via docker volume create bhLogs
and docker volume create bhDatabases
ran: docker run -p 7474:7474 -p 7687:7687 specterops/bloodhound-neo4j -volumes bhDatabases:/var/lib/neo4j/data/databases
also tried: docker run -p 7474:7474 -p 7687:7687 specterops/bloodhound-neo4j -m bhDatabases:/var/lib/neo4j/data/databases
all had the same errors
i also tried a docker-compose file
version: '3'
services:
neo4j:
image: specterops/bloodhound-neo4j
volumes:
- logs:/var/lib/neo4j/logs:rw
- databases:/var/lib/neo4j/data/databases:rw
ports:
- 7474:7474
- 7687:7687
volumes:
logs:
databases:
error:ERROR: In file '.\docker-compose.yml', service 'volumes' must be a mapping not an array.
im no expert in docker or compose, although have used them for a few different projects, so not sure where the issue is -- if you have any thoughts let me know
Fixed the compose file...not sure why wouldnt run in the standard docker run command
compose file:
version: '3'
services:
neo4j:
image: specterops/bloodhound-neo4j
volumes:
- ./logs:/var/lib/neo4j/logs
- ./databases:/var/lib/neo4j/data/databases
ports:
- 7474:7474
- 7687:7687
maybe its useful to someone
@lostInSpaceSomewhere the error you are getting relating to the volumes is because you are trying to use a relative path (./logs and ./db) for the volume mapping. You can get away with this with docker-compose however docker run interprets anything that does not appear to be an absolute path as a named volume and throws out an error.
There are some ways around it like using $(pwd)/logs
instead of ./logs
I've had success quickly deploying neo4j for Bloodhound using docker. It may be useful to add this to the Wiki:
docker run -p 7474:7474 -p 7687:7687 neo4j