Skip to content

Commit

Permalink
Merge pull request #32 from aerickson/docker_docs
Browse files Browse the repository at this point in the history
development: add docker docs
  • Loading branch information
heitbaum authored Sep 25, 2022
2 parents 8d7d1c4 + 64e2433 commit 51de25d
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 1 deletion.
1 change: 1 addition & 0 deletions SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
## Development <a href="#development-1" id="development-1"></a>

* [Building (Basics)](development-1/build-basics.md)
* [Building (Docker)](development-1/build-docker.md)
* [Building (Advanced)](development-1/build-advanced.md)
* [Building (Windows WSL)](development-1/building-windows-wsl.md)
* [Beginners Guide to Git](development-1/git-tutorial.md)
Expand Down
2 changes: 1 addition & 1 deletion development-1/build-basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The LibreELEC “build-system” is a collection of scripts that simplify the co

## Environment

The team currently builds official releases and snapshots on Ubuntu LTS server 18.04 or 20.04. It is possible to use other Linux distrutions \(Arch, Debian, Fedora, Gentoo, Manjaro, etc.\) but Ubuntu is the most-used and proven. If you plan to build on an existing Linux desktop we recommend building in a Docker container to isolate the build folders from the rest of the OS \(Dockerfiles can be found in the tools folder of the main LibreELEC git repo\). Another option is building in a Virtual Machine, e.g. Oracle Virtualbox \($free\) or vmware Workstation.
The team currently builds official releases and snapshots on Ubuntu LTS server 18.04 or 20.04. It is possible to use other Linux distrutions \(Arch, Debian, Fedora, Gentoo, Manjaro, etc.\) but Ubuntu is the most-used and proven. If you plan to build on an existing Linux desktop we recommend building in a Docker container to isolate the build folders from the rest of the OS \(Dockerfiles can be found in the tools folder of the main LibreELEC git repo, see [Build (Docker)](build-docker.md) for more info\). Another option is building in a Virtual Machine, e.g. Oracle Virtualbox \($free\) or vmware Workstation.

Note: If you want to compile older LibreELEC releases you will need to use an era-appropriate Ubuntu LTS release, e.g. LibreELEC 7.0 will need Ubuntu 14.04 or 16.04.

Expand Down
50 changes: 50 additions & 0 deletions development-1/build-docker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Building \(Docker\)

## Build Container

```bash
# apply patches to make the image like in CI
sed -i -e "/^USER docker/i RUN ln -s /usr/bin/gcc-10 /usr/bin/cc" tools/docker/focal/Dockerfile

# per tools/docker/README.md
docker build --pull -t libreelec tools/docker/focal
```

## Run Commands

For a list of commands, see [Build (Basics)](build-basics.md).

### Basic

```bash
docker run \
--it --rm \
--log-driver none \
-v `pwd`:/build -w /build \
-e PROJECT=Generic \
-e ARCH=x86_64 \
-e MTPROGRESS=yes \
libreelec CMD
```

### Advanced

Limit CPU and RAM so your system remains responsive.

```bash
docker run \
--it --rm \
--log-driver none \
-v `pwd`:/build -w /build \
`# setting these the same disables swapping` \
--memory "6g" --memory-swap "6g" \
`# uses all cpus, but will reserve cycles on each` \
`#--cpus "4"` \
`# limit to certain processors` \
--cpuset-cpus "0-3" \
-e PROJECT=Generic \
-e ARCH=x86_64 \
-e MTPROGRESS=yes \
libreelec CMD
```

0 comments on commit 51de25d

Please sign in to comment.