GrammaticalFramework / gf-core

Grammatical Framework core: compiler, shell & runtimes
https://www.grammaticalframework.org
Other
129 stars 35 forks source link

GF on Docker? #145

Open kristiank opened 2 years ago

kristiank commented 2 years ago

A quick search on the internet for Grammatical Framework and Docker finds many hints for at least some support of GF having been dockerized.

Looking at it as a newcomer from the outside, it would be much worth having information about Docker under the Get started > Download GF heading.

What I would expect is some Docker commands for getting gf --server running in a container instance and some notes on which version of GF it contains and whether the version will always be the latest when running the Docker commands again.

johnjcamilleri commented 2 years ago

Yes this makes sense, to be honest I thought there already was a Dockerfile in gf-core but apparently not.

Compiling and running GF in a Docker container is straightforward enough, but we need to think about how to get grammars into this container.

anka-213 commented 1 year ago

It might be possible to resolve this by doing the dockerfile in several layers, where e.g. the rgl dockerfile depends on the gf-core one. One downside is that it might be confusing to have a gf docker image that doesn't include rgl. But maybe naming it gf-core and naming the one with rgl just gf is enough to resolve that confusion.

When it comes to user grammars, the user could in turn have their own dockerfile or docker-compose config that imports their grammars into the image or mounting it. We could provide a template for doing that, to make it easier.

Using layers would also resolve the GF cloud issue, by having a separate docker-file for that as well, that depends on the gf-core docker file, in which case that docker image would also be imported by the one just called gf.