Building the GeoCARET Docker Image

Docker can be used to quickly & easily create a run-time environment for running GeoCARET, without having to install the correct version of Python, gcloud CLI, or other required dependencies.

To use GeoCARET with Docker you will need to build and run an instance of a Docker image - see Docker Images.

Generally, you will not need to build your own image, as we provide a pre-built image that will be suitable for most purposes. See Pull the GeoCARET Docker image for accessing & using the pre-built GeoCARET docker image.

However, if you do want to build your own image, this guide will take you through the process.

As a prerequisite, you need to first install Docker Desktop - an application that provides an easy-to-use interface for working with Docker on a desktop operating system.

Note

This documentation assumes that the reader is comfortable working in the shell (linux/macOS) or PowerShell (Windows) and has basic experience with git.

Installing Docker Desktop (a prerequisite)

Docker Desktop is free and can be installed on Windows, Mac & Linux computers, Please visit https://docs.docker.com/get-docker/ and follow the appropriate instructions for installing Docker Desktop on your computer.

Once installed, make sure Docker Desktop is running. To do so, open a shell prompt (Linux/macOS) or PowerShell (Windows) and type the following:

docker -v

This should return the version number of the installed version of docker. If you see an error message along the lines of ‘Cannot connect to the Docker daemon’ then restart Docker Desktop and try again.

Building the GeoCARET Docker image

Clone the GeoCARET GitHub repository

First clone the GeoCARET GutHub repository to your computer:

git clone https://github.com/UoMResearchIT/geocaret

Alternatively, if you don’t use git, download the package from the GitHub page and extract to the working folder.

Build the GeoCARET Docker Image

Building the GeoCARET image is simple. Make sure that

  • Docker Desktop is running

  • You are in the root folder of the GeoCARET code base that you cloned in the previous step.

Then inside the root directory of GeoCARET, i.e. where setup.py is located, type:

docker build -t geocaret .

Building the image might take a short while. The resulting image will be stored in a dedicated Docker folder on your computer. If you open Docker Desktop and go to the ‘Images’ section, you should see the ‘geocaret’ image in the list.

You can now refer to Using the GeoCARET Docker Image for details on how to run GeoCARET using your newly built Docker image.