2017-10-08 20:11:17 +02:00
# Build container
2021-04-10 08:29:25 +00:00
**Docker containers**
- Ubuntu
- bionic (Ubuntu 18.04)
- focal (Ubuntu 20.04)
- groovy (Ubuntu 20.10)
- hirsute (Ubuntu 21.04)
- Debian
- stretch (Debian 9.0)
- buster (Debian 10.0)
- sid (Debian unstable)
2020-05-30 10:18:09 +00:00
**Build docker image**
2017-10-08 20:11:17 +02:00
2020-05-30 10:18:09 +00:00
Use the following command to create a docker image and tag it with `libreelec` .
2017-10-08 20:11:17 +02:00
2020-05-30 10:18:09 +00:00
```
docker build --pull -t libreelec tools/docker/focal
```
2017-10-08 20:11:17 +02:00
2020-05-30 10:18:09 +00:00
See https://docs.docker.com/engine/reference/commandline/build/ for details on `docker build` usage.
2017-10-08 20:11:17 +02:00
2020-05-30 10:18:09 +00:00
**Build LibreELEC image inside a container**
2017-10-08 20:11:17 +02:00
2021-12-31 23:34:18 +11:00
Change to your LibreELEC.tv development directory that you checked out with <br>
`git clone https://github.com/` **myname**`/LibreELEC.tv.git`
```
cd LibreELEC.tv
```
Then use the following command to build LibreELEC images inside a new container based on the docker image tagged with `libreelec` . (The `pwd` uses the current directory - which must have the LibeELEC `Makefile` in it.)
2020-05-30 10:18:09 +00:00
```
2022-01-06 16:19:20 +11:00
docker run --rm --log-driver none -v `pwd` :/build -w /build -it libreelec make image
2020-05-30 10:18:09 +00:00
```
Use `--env` , `-e` or `--env-file` to pass environment variables used by the LibreELEC buildsystem.
```
2022-01-06 16:19:20 +11:00
docker run --rm --log-driver none -v `pwd` :/build -w /build -it -e PROJECT=RPi -e DEVICE=RPi4 -e ARCH=arm libreelec make image
2020-05-30 10:18:09 +00:00
```
See https://docs.docker.com/engine/reference/commandline/run/ for details on `docker run` usage.
2022-01-06 16:19:20 +11:00
Note: `dockerd` is set to send all its logs to journald using the setting `--log-driver=journald` (so if you don't set the `--log-driver none` for your `docker run` these logs will be sent through to your log.
Refer:
https://github.com/LibreELEC/LibreELEC.tv/blob/140ad28a258167e0e87daf1e474db37215b2caf3/packages/addons/service/docker/source/system.d/service.system.docker.service#L12