2

I'm trying to run KIE Drools Workbench in docker.

If I stop the container, I lose my git repo, and this is getting super annoying (because the KIE UI forces you to upload your rules one by one).

Instead I want the container to use a host dir for its git repo.

So I've tried mapping a local host dir /opt/git to where I figured it stores the git repo

docker run -v /opt/git:/opt/jboss/wildfly/bin/.niogit -d --name drools-brms jboss/brms:6.3.0.Final

But I get:

Caused by: java.io.IOException: Creating directories for /opt/git/.niogit/system.git failed

/opt/git is owned by root on the host. Is there any way to give chown permissions to the jboss user who only exists in the container?

Doesn't seem like it :/

djb
  • 1,635
  • 3
  • 26
  • 49
  • Probably easier to `chown` your host folder to a host user with the same uid as the jboss user inside the container – Xiongbing Jin May 11 '16 at 17:32
  • Have you tried running with the `--privileged` flag? – Kevan Ahlquist May 11 '16 at 18:56
  • --privileged didn't fix it. I think it's an ownership issue. Will try work out how to do the UID solution. Any helpful links appreciated. – djb May 12 '16 at 08:15
  • I'll try named containers - http://stackoverflow.com/questions/23544282/what-is-the-best-way-to-manage-permissions-for-docker-shared-volumes – djb May 12 '16 at 13:37

0 Answers0