From d7312385e0b16d92783b791f2a5304f91d992ba7 Mon Sep 17 00:00:00 2001 From: Jonas Karlman Date: Sat, 30 May 2020 10:18:09 +0000 Subject: [PATCH] tools/docker: update readme --- tools/docker/README.md | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/tools/docker/README.md b/tools/docker/README.md index 70582a2e14..0c45417eb3 100644 --- a/tools/docker/README.md +++ b/tools/docker/README.md @@ -1,17 +1,27 @@ # Build container -**Clone repo** +**Build docker image** -* `cd ~/` -* `git clone https://github.com/LibreELEC/LibreELEC.tv.git LibreELEC` +Use the following command to create a docker image and tag it with `libreelec`. -**Build container** +``` +docker build --pull -t libreelec tools/docker/focal +``` -* `cd ~/LibreELEC` -* `docker build --pull -t libreelec tools/docker/bionic` +See https://docs.docker.com/engine/reference/commandline/build/ for details on `docker build` usage. -**Build image inside container** +**Build LibreELEC image inside a container** -* `docker run -v ~/:/home/docker -h libreelec -it libreelec` -* `cd ~/LibreELEC` -* `make image` +Use the following command to build LibreELEC images inside a new container based on the docker image tagged with `libreelec`. + +``` +docker run --rm -v `pwd`:/build -w /build -it libreelec make image +``` + +Use `--env`, `-e` or `--env-file` to pass environment variables used by the LibreELEC buildsystem. + +``` +docker run --rm -v `pwd`:/build -w /build -it -e PROJECT=RPi -e DEVICE=RPi4 -e ARCH=arm libreelec make image +``` + +See https://docs.docker.com/engine/reference/commandline/run/ for details on `docker run` usage.