Can't connect to kie-workbench git repo when running in Docker

505 Views Asked by At

When I run kie-workbench on Wildfly from a terminal I am able to git clone ssh:// .... successfully. When I am running the same setup in Docker, the connection never happens.

git clone ssh://kie-workbench@localhost:8001/DtsSpace/Eligibility
Cloning into 'Eligibility'...
kex_exchange_identification: Connection closed by remote host
Connection closed by 127.0.0.1 port 8001
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

I can access the workbench on my browser fine on port 8080.

From my Dockerfile:

####### CUSTOM JBOSS USER ############
USER jboss
WORKDIR $JBOSS_HOME/bin/
####### EXPOSE INTERNAL JBPM GIT PORT ############
EXPOSE 8080 8001

####### RUNNING DROOLS-WB ############
CMD ["/opt/jboss/wildfly/bin/standalone.sh", "-b", "0.0.0.0", "-bmanagement", "0.0.0.0", "-c", "standalone-full.xml"]

and from my docker-compose.yml:

version: '3'

services:

  kie-wb:
    container_name: business-central
    image: jatchison/kie-workbench:latest
    ports:
      - 8080:8080
      - 8001:8001
    volumes:
      - ./.niogit:/opt/jboss/wildfly/bin/.niogit

I have successfully done it inside of Docker before but that was on Linux and a Mac, so is there an issue with Windows 10?

WILDFLY_VERSION 20.0.1.Final KIE_VERSION 7.42.0.Final

I have tried different versions and combinations of versions of wildfly and workbench.

1

There are 1 best solutions below

0
John Atchison On

I'm not sure why, but it works, so I'll post it. In the DockerHub documentation for drools-workbench, Michael talks about using the internal git repository:

If necessary you can make GIT repositories available from outside localhost using the following Java system property: -org.uberfire.nio.git.ssh.host=0.0.0.0

It can be set a number of ways. I chose to put it in my standalone-full.xml. It's possible that, since the engine isn't "exactly" running on localhost, it makes this necessary. It works now, so I'm satisfied.