From 7dd96d78426e4a5e38f3ac74decddff526141a21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Fri, 4 Oct 2019 12:01:26 +0200 Subject: [PATCH] Add tutor docker image (experimental) --- CHANGELOG.md | 1 + Dockerfile | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 Dockerfile diff --git a/CHANGELOG.md b/CHANGELOG.md index 452d1b3..9864190 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ Note: Breaking changes between versions are indicated by "💥". ## Unreleased +- [Feature] Introduce tutor docker image - [Feature] Introduce `local hook` command for plugin development. - [Bugfix] Persist `private.txt` file between two runs of `config save`. (#247) - [Improvement] Added configuration values to limit the number of gunicorn workers for the LMS and CMS. diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f8aedfe --- /dev/null +++ b/Dockerfile @@ -0,0 +1,26 @@ +# This image is still very much a work in progress. It was tested on Linux and allows +# to run tutor from inside docker. In practice, all "tutor" commands should be replaced # by: +# +# docker run --rm -it -P \ +# -v /var/run/docker.sock:/var/run/docker.sock \ +# -v /opt/tutor:/opt/tutor tutor +# +# Note that this image does not come with any plugin, by default. Also, the image does +# not include the `kubectl` binary, so `k8s` commands will not work. +# Because this image is still experimental, and we are not quite sure if it's going to +# be very useful, we do not provide any usage documentation. + +FROM python:3.7 + +# As per https://github.com/docker/compose/issues/3918 +COPY --from=library/docker:19.03 /usr/local/bin/docker /usr/bin/docker +COPY --from=docker/compose:1.24.0 /usr/local/bin/docker-compose /usr/bin/docker-compose + +RUN pip install tutor-openedx +RUN mkdir /opt/tutor +ENV TUTOR_ROOT /opt/tutor + +EXPOSE 80 +EXPOSE 443 + +ENTRYPOINT ["tutor"]