7
0
mirror of https://github.com/ChristianLight/tutor.git synced 2024-06-09 01:02:21 +00:00

Add a big fat warning against "sudo"

Also, the permission error that is frequently encountered is added at
the top of the list of frequent issues in the docs.
This commit is contained in:
Régis Behmo 2020-03-16 17:39:43 +01:00
parent 28c761fe76
commit cf041568d0
2 changed files with 14 additions and 0 deletions

View File

@ -40,6 +40,15 @@ If you'd rather use a graphical user interface for viewing logs, you are encoura
The containerized Nginx needs to listen to ports 80 and 443 on the host. If there is already a webserver, such as Apache or Nginx, running on the host, the nginx container will not be able to start. To solve this issue, check the section on :ref:`how to setup a web proxy <web_proxy>`.
"Couldn't connect to docker daemon"
-----------------------------------
This is not an error with Tutor, but with your Docker installation. This is frequently caused by a permission issue. Before running Tutor, you should be able to run::
docker run --rm hello-world
If the above command does not work, you should fix your Docker installation. Some people will suggest to run Docker as root, or with `sudo`; *do not do this*. Instead, what you should probably do is to add your user to the "docker" group. For more information, check out the `official Docker installation instructions <https://docs.docker.com/install/linux/linux-postinstall/#manage-docker-as-a-non-root-user>`__.
Help! The Docker containers are eating all my RAM/CPU/CHEESE
------------------------------------------------------------

View File

@ -1,4 +1,5 @@
#! /usr/bin/env python3
import os
import sys
import appdirs
@ -53,6 +54,10 @@ def main():
)
@click.pass_context
def cli(context, root):
if os.getuid() == 0:
fmt.echo_alert(
"You are running Tutor as root. This is strongly not recommended. If you are doing this in order to access the Docker daemon, you should instead add your user to the 'docker' group. (see https://docs.docker.com/install/linux/linux-postinstall/#manage-docker-as-a-non-root-user)"
)
context.obj = Context(root)