hapifhir / hapi-fhir

🔥 HAPI FHIR - Java API for HL7 FHIR Clients and Servers
http://hapifhir.io
Apache License 2.0
2.04k stars 1.33k forks source link

mvn install fails in FHIR JPA Test Utilities, needs a docker daemon ? #5048

Open JervenBolleman opened 1 year ago

JervenBolleman commented 1 year ago

on a clean git checkout from github on a fedora 37 with java 17 as the default JDK. I get a

java.lang.ExceptionInInitializerError at ca.uhn.fhir.jpa.embedded.HapiSchemaMigrationTest.(HapiSchemaMigrationTest.java:38) in the HAPI FHIR JPA Server Test Utilities project.

I just did

git clone mvn install

14:06:53.903 [main] INFO o.t.utility.ImageNameSubstitutor [ImageNameSubstitutor.java:50] - Image name substitution will be performed by: DefaultImageNameSubstitutor (composite of 'ConfigurationFileImageNameSubstitutor' and 'PrefixingImageNameSubstitutor') 14:06:54.121 [main] INFO o.t.d.DockerMachineClientProviderStrategy [DockerMachineClientProviderStrategy.java:58] - docker-machine executable was not found on PATH ([/home/jbollema/perl5/bin, /home/jbollema/bin/apache-ant-1.10.1//bin, /home/jbollema/bin/apache-jena-4.6.1//bin, /home/jbollema/.local/bin, /home/jbollema/bin, /usr/local/bin, /usr/local/sbin, /usr/bin, /usr/sbin, /var/lib/snapd/snap/bin, /opt/gradle/gradle-6.7//bin, /home/jbollema/.cargo/bin]) 14:06:54.125 [main] ERROR o.t.d.DockerClientProviderStrategy [DockerClientProviderStrategy.java:150] - Could not find a valid Docker environment. Please check configuration. Attempted configurations were: 14:06:54.126 [main] ERROR o.t.d.DockerClientProviderStrategy [DockerClientProviderStrategy.java:152] - UnixSocketClientProviderStrategy: failed with exception InvalidConfigurationException (Could not find unix domain socket). Root cause AccessDeniedException (/var/run/docker.sock) 14:06:54.126 [main] ERROR o.t.d.DockerClientProviderStrategy [DockerClientProviderStrategy.java:154] - As no valid configuration was found, execution cannot continue 

Which seems to say I need to have a docker install to be able to run the unit tests. But that is not obvious from the documentation.

anton-kurilov commented 1 year ago

If you got the project built, might be worth it to add a pull request to update the doc noting the need for docker, looks like docs are found here: https://github.com/hapifhir/hapi-fhir/blob/master/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/contributing/hacking_guide.md