- Fix permissions in `/opt` to allow non-root user to compile Anki (which requires reading and/or creating files below `/opt`).
- Create `pythonbuilder` stage, which runs only `make build`. The wheels from this stage are copied into the final stage.
- Add README.docker
Docker provides a standard way of installing software. This is particularly useful with software that requires fairly complex dependencies, like Anki. The Dockerfile added in this commit builds a Docker image with Anki. The Docker image is based on `python:3.8`, which is based on a Debian Buster image. This Docker image can be useful to end users, because it can be installed on any system that has Docker (e.g., Windows, macOS, Linux), and it is also useful to developers who might not have -- or want to install -- the dependencies that Anki requires at compile time.
To build the image, run `docker build --tag anki .` in the project root directory.
To run the image with a GUI (on Unix-like systems), run
```
docker run --rm -it --env "DISPLAY=$DISPLAY" --volume /tmp/.X11-unix:/tmp/.X11-unix anki
```
One may also mount a user's Anki directory into the container and run the container as the current user.
One may also run with Singularity (which typically has more transparent support for GUI applications and behaving as the current user) by first building the Docker image as above and then converting to Singularity Image Format (SIF) with
```
sudo singularity build anki.sif docker-daemon://anki:latest
```
Run the Singularity image with
```
singularity run anki.sif
```