This document is incomplete
Before You Start
Familiarize yourself with Tutor plugin concepts: https://docs.tutor.overhang.io/plugins/intro.html
Install and run the plugin cookiecutter to create a project skeleton: https://github.com/overhangio/cookiecutter-tutor-plugin
Anywhere you see myplugin in these instructions it will refer to the name of the plugin you have just created
Create a Dockerfile for Your Service
Create a Dockerfile at
tutormyplugin/templates/myplugin/build/myplugin/Dockerfile
If you aren’t sure what your service needs take a look at tutor-contrib-exams as a minimal example
This section could probably use more guidance on Dockerfiles…
Add an image build hook to
tutormyplugin/plugin.py
################# Docker image management # To build an image with `tutor images build myimage`, add a Dockerfile to templates/exams/build/myimage and write: hooks.Filters.IMAGES_BUILD.add_item(( "myplugin", ("plugins", "myplugin", "build", "myplugin"), "{{ MYPLUGIN_DOCKER_IMAGE }}", (), ))
Take note of
MYPLUGIN_DOCKER_IMAGE
we need to define this config value inplugin.py
as wellTODO
Add docker-compose patches to
tutormyplugin/patches
to get your service running locallyTo run tutor local and tutor dev you will minimally need:
local-docker-compose-services
local-docker-compose-dev-services
local-docker-compose-jobs-services
As a reference see tutor-contrib-exams or tutor-discovery
Full reference for templates that could be added here https://docs.tutor.overhang.io/reference/patches.html#patches