Regarding tutor commands failing, you can always verify the commands and how to use them with the flag -h. Example: tutor -h
, tutor config -h
, tutor images build -h
, etc. You also have all the commands here: Command line interface (CLI) — Tutor documentation.
About your problem with pulling images. I suggest you check if it is in your config.yml
file (inside your TUTOR_ROOT, tutor config printroot
); you have defined some of these variables listed here about docker images Configuration and customisation — Tutor documentation. If you didn’t modify those variables, they should have the default value, and all those images are public in Docker, so you shouldn’t need a Docker login.
About building images, you should be able to build the openedx-dev
and mfe
images, as some collaborators explained before. For more info: Open edX development — Tutor documentation.
I know it is a lot of information
If someone asks me to try and edit the code of an xblock.
I will do this following the Sharing directories with containers doc:
- Using a clean installation of tutor.
1.1. Uninstalling what I have. Installing Tutor — Tutor documentation
1.2. Install tutor again
- Launch a dev env:
tutor dev launch
- Stop my containers:
tutor dev stop
- Clone the repo I will test, modify, or debug, e,g,.
git clone git@github.com:openedx/xblock-in-video-quiz.git
- I want that in my cms container to use that xblock in Studio, so I mount that xblock in cms:
tutor mounts add cms:<your_local_path>:<container_path>
, in my case, tutor mounts add cms:xblock-in-video-quiz:/openedx/xblock-in-video-quiz
- Run
tutor mounts list
to verify everything is okay.
- Start the env again:
tutor dev start
- In another terminal, I will run:
docker exec -it <cms_container> bash
. The cms container could come from docker ps
or the tutor dev start
logs. I think the default is something like tutor_dev-cms-1
; in my particular case, it looks like: docker exec -it dev_redwood_env_new-cms-1 bash
.
- As in step 5, I said I mount the xblock in
/openedx/xblock-in-video-quiz
, I’ll run: pip install -e /openedx/xblock-in-video-quiz
. This inside the docker container (step 8).
- In another terminal, I will run:
tutor dev restart cms
That’s it!
That’s the way I use the sharing directories.
Behind that process, the logic is: I am sharing the xblock-in-video-quiz directory I cloned with the cms container in the path /openedx/xblock-in-video-quiz. So, each change I made in my cloned directory will appear inside the container in /openedx/xblock-in-video-quiz. And when I install with pip install -e, I install the xblock in edition mode. So, my changes will affect the platform.
In this particular case, to see my changes…
- Prepare dummy data
1.1. tutor dev do createser --staff --superuser admin admin@example.com
1.2. tutor dev do importdemocourse
- Enter the browser to the Studio: http://studio.local.edly.io:8001/
- Login and enter to edit the course.
- Add
"invideoquiz"
in Settings → Advanced Settings. From: GitHub - openedx/xblock-in-video-quiz
- Create sections and a unit.
- Add an in-video Xblock in the Advance options.
- Made a change in the Xblock, example, adding the following in
xblock-in-video-quiz/invideoquiz/public/css/invideoquiz.css
:
body {
background-color: #de3011; /* Replace with your desired color */
}
- Reload the Studio page: http://studio.local.edly.io:8001/
- See my changes
And again: These changes aren’t persistent. If you launch again, you will lose these changes (the only commands you should avoid using are the launch and the init commands related to the edited container).
I use this to test things on the fly, and I use the build for the openedx image, which we use in stage and production.
But it is up to you. If you find a way that works well for you, go ahead.
I hope this and the other answers help you with your problem.