You can directly pull a version of latest GumTree's image from Docker Hub via the command docker pull gumtreediff/gumtree.
You can also compile the image on your machine. Go to the root GumTree's folder and compile the image: docker build . -f docker/Dockerfile -t gumtreediff/gumtree.
To use GumTree's image, You need to:
- bind the "original" folder to the
/leftvolume of the container - bind the "modified" folder to the
/rightvolume of the container - bind the port
4567of the container to access GumTree's web interface
The classical way to run a GumTree's container is the command docker run --rm -v /my/original-folder:/left -v /my/modified-folder:/right -p 4567:4567 gumtreediff/gumtree webdiff /left /right.
You can consult the diff at the URL http://localhost:4567. Of course, all other GumTree's commands are available.
You can easily integrate GumTree's container with Git by adding the following configuration into the $HOME/.gitconfig file.
[difftool "gumtree-docker"]
cmd = docker run --rm -v /private/$LOCAL:/left -v /private/$REMOTE:/right -p 4567:4567 gumtreediff/gumtree webdiff /left /right[difftool "gumtree-docker"]
cmd = docker run --rm -v $LOCAL:/left -v $REMOTE:/right -p 4567:4567 gumtreediff/gumtree webdiff /left /rightYou can invoke GumTree's from git by running the command git difftool -d --no-symlinks -t gumtree-docker. We recommend putting an alias in the alias section of $HOME/.gitconfig such as:
[alias]
gd = difftool -d --no-symlinks -t gumtree-dockerYou can then use the command git gd.
If you want to debug GumTree's image use the following command line: docker run --rm -it -v /my/original-folder:/left -v /my/modified-folder:/right -p 4567:4567 --entrypoint "/bin/bash" gumtreediff/gumtree.