-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32 from aerickson/docker_docs
development: add docker docs
- Loading branch information
Showing
3 changed files
with
52 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` | ||
|