Open kristiank opened 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.
gf-core
repository. So maybe we have a start-docker.sh
script, which if provided a path to RGL sources, compiles them as part of the image build. If not provided, either pulls the latest from GitHub and uses those, or just doesn't compile any RGL.start-docker.sh
script does slightly different things depending on whether it is given a path to gf-cloud
or not.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
.
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.