Closed matentzn closed 6 years ago
@hlapp could you comment whether this should already work, or if it is easy to support?
@matentzn this is supported out of the box, there's no need to build another container on top of it. See Runtime Customization in the README accompanying the Dockerfile.
Note, however, that in principle Owlery is configured through the application.conf
file, not command line parameters or environment variables. Owlery expects to find the config file, and the container provides no default; you must map one into the container. You could in principle give a minimum application.conf
and then use trailing -Dproperty.name=value
parameters in the docker run
command line to add ontologies to be loaded. (Alternatively, you could use the --env JAVA_OPTS="-Dproperty.name=value"
mechanism to override the default setting (but then be sure to include the increased memory, the default is JAVA_OPTS="-Xmx8G"
. See README documentation.) Either way, this will be hairy since Owlery expects the ontologies that are to be loaded to be given as an array of dictionaries. (This has nothing to do with the container, it's because of how Owlery wants to be configured.)
Hey Hilmar, Jim, much thanks for the clarification. Hairy is fine! The reason for this use case is that we are generating an ontology on the fly, and we then want to fire up an owlery server loading it. I must admit that I saw your documentation before, but I don't know unfortunately what you mean by the phrase: you must map one into the container
. As far as I can see, your container does not provide any mount points for volumes? I would be very happy if you could provide me with a working example run command for this case:
O=/my/local/path/generatedontology.owl sed -i '/ontologypath/${O}/g' application.conf docker run -p 80:8080 X phenoscape/owlery
Greatly appreciated!
@matentzn as per documentation, the config file is expected at /srv/conf/application.conf
within the container. Note that containers don't "provide" mount points - you can map host volumes to any path in the container. These are the --volume
or --mount
options to docker run
. I'd suggest you consult the corresponding Docker documentation, which spells it out pretty well. There are many options to do this, and what is best depends on your local setup and use case, so it's worth understanding in full how this works in Docker.
Okay thanks:) I will close the issue now.
It would be great if you could provide an example on how we can, using the phenoscape/owlery base image from dockerhub, simply fire up an owlery server with an ontology provided as a URL at runtime (rather than inheriting the container and overriding the config file). Something along these lines: