6
0
mirror of https://github.com/ChristianLight/tutor.git synced 2024-11-19 19:45:25 +00:00
tutor/docs
Régis Behmo f9402f7879 feat: run all services as unprivileged containers
With this change, containers are no longer run as "root" but as unprivileged
users. This is necessary in some environments, notably some Kubernetes
clusters.

To make this possible, we need to manually fix bind-mounted volumes in
docker-compose. This is pretty much equivalent to the behaviour in Kubernetes,
where permissions are fixed at runtime if the volume owner is incorrect. Thus,
we have a consistent behaviour between docker-compose and Kubernetes.

We achieve this by bind-mounting some repos inside "*-permissions" services.
These services run as root user on docker-compose and will fix the required
permissions, as per build/permissions/setowner.sh These services simply do not
run on Kubernetes, where we don't rely on bind-mounted volumes. There, we make
use of Kubernete's built-in volume ownership feature.

With this change, we get rid of the "openedx-dev" Docker image, in the sense
that it no longer has its own Dockerfile. Instead, the dev image is now simply
a different target in the multi-layer openedx Docker image. This makes it much
faster to build the openedx-dev image.

Because we declare the APP_USER_ID in the dev/docker-compose.yml file, we need
to pass the user ID from the host there. The only way to achieve that is with a
tutor config variable. The downside of this approach is that the
dev/docker-compose.yml file is no longer portable from one machine to the next.
We consider that this is not such a big issue, as it affects the development
environment only.

We take this opportunity to replace the base image of the "forum" image. There
is now no need to re-install ruby inside the image. The total image size is
only decreased by 10%, but re-building the image is faster.

In order to run the smtp service as non-root, we switch from namshi/smtp to
devture/exim-relay. This change should be backward-compatible.

Note that the nginx container remains privileged. We could switch to
nginxinc/nginx-unprivileged, but it's probably not worth the effort, as we are
considering to get rid of the nginx container altogether.

Close #323.
2021-10-25 16:26:04 +02:00
..
download feat: switch the package name from "tutor-openedx" to "tutor" 2021-07-03 11:07:37 +02:00
img docs: reorganize local guides in tutorials 2021-10-14 12:59:57 +02:00
plugins fix dead links 2021-09-30 12:51:15 +02:00
reference/cli docs: generate reference docs automatically 2021-10-14 12:59:57 +02:00
tutorials feat: run all services as unprivileged containers 2021-10-25 16:26:04 +02:00
_release_description.md Clarify the RAM requirements, especially for Mac OS. 2020-03-16 18:12:57 +01:00
.gitignore Migrate openedx-docker project to Tutor 👩‍🏫 2018-12-26 19:27:08 +01:00
conf.py docs: generate reference docs automatically 2021-10-14 12:59:57 +02:00
configuration.rst feat: run all services as unprivileged containers 2021-10-25 16:26:04 +02:00
dev.rst feat: run all services as unprivileged containers 2021-10-25 16:26:04 +02:00
faq.rst docs: advertise Cairn and the maintainers group 2021-07-03 11:07:37 +02:00
gettingstarted.rst docs: advertise Cairn and the maintainers group 2021-07-03 11:07:37 +02:00
index.rst docs: add links to source code/forums/pypi 2021-10-14 12:59:57 +02:00
install.rst docs: move podman install to its own tutorial 2021-10-14 12:59:57 +02:00
intro.rst docs: advertise Cairn and the maintainers group 2021-07-03 11:07:37 +02:00
k8s.rst docs: reorganize local guides in tutorials 2021-10-14 12:59:57 +02:00
local.rst docs: add tutorial on running tutor edge 2021-10-14 12:59:57 +02:00
Makefile docs: build docs in CI (and be nitpicky about it) 2021-10-14 12:59:57 +02:00
plugins.rst feat: upgrade to open-release/lilac.master 2021-06-08 23:29:12 +02:00
quickstart.rst feat: switch the package name from "tutor-openedx" to "tutor" 2021-07-03 11:07:37 +02:00
reference.rst docs: generate reference docs automatically 2021-10-14 12:59:57 +02:00
run.rst docs: build docs in CI (and be nitpicky about it) 2021-10-14 12:59:57 +02:00
testimonials.rst v10.0.0 Upgrade to Juniper (2020-06-15) 2020-06-15 10:19:07 +02:00
troubleshooting.rst feat: get rid of the nginx container and services 2021-10-25 16:18:42 +02:00
tutor.rst goodbye "edge" hello "nightly"! 2021-10-14 12:59:57 +02:00
tutorials.rst goodbye "edge" hello "nightly"! 2021-10-14 12:59:57 +02:00
whatnext.rst docs: reorganize local guides in tutorials 2021-10-14 12:59:57 +02:00