From 9f0c84db12aa00f83d07277d9707bf54c901343d Mon Sep 17 00:00:00 2001 From: Jonas Karlman Date: Fri, 29 May 2020 20:57:09 +0000 Subject: [PATCH 1/4] tools/docker: add libparse-yapp-perl package --- tools/docker/bionic/Dockerfile | 2 +- tools/docker/eoan/Dockerfile | 2 +- tools/docker/stretch/Dockerfile | 2 +- tools/docker/xenial/Dockerfile | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/docker/bionic/Dockerfile b/tools/docker/bionic/Dockerfile index 9a16f51ea8..0c31451a0f 100644 --- a/tools/docker/bionic/Dockerfile +++ b/tools/docker/bionic/Dockerfile @@ -21,7 +21,7 @@ RUN apt-get update && apt-get install -y \ wget bash bc gcc sed patch patchutils tar bzip2 gzip xz-utils perl gawk gperf zip unzip diffutils lzop make file \ g++ xfonts-utils xsltproc default-jre-headless python3 \ libc6-dev libncurses5-dev \ - libjson-perl libxml-parser-perl \ + libjson-perl libxml-parser-perl libparse-yapp-perl \ golang-go \ git openssh-client \ --no-install-recommends \ diff --git a/tools/docker/eoan/Dockerfile b/tools/docker/eoan/Dockerfile index 2929fcc036..4d5abffe96 100644 --- a/tools/docker/eoan/Dockerfile +++ b/tools/docker/eoan/Dockerfile @@ -21,7 +21,7 @@ RUN apt-get update && apt-get install -y \ wget bash bc gcc sed patch patchutils tar bzip2 gzip xz-utils perl gawk gperf zip unzip diffutils lzop make file \ g++ xfonts-utils xsltproc default-jre-headless python3 \ libc6-dev libncurses5-dev \ - libjson-perl libxml-parser-perl \ + libjson-perl libxml-parser-perl libparse-yapp-perl \ golang-go \ git openssh-client \ --no-install-recommends \ diff --git a/tools/docker/stretch/Dockerfile b/tools/docker/stretch/Dockerfile index ebbab01ac5..74259b33f9 100644 --- a/tools/docker/stretch/Dockerfile +++ b/tools/docker/stretch/Dockerfile @@ -22,7 +22,7 @@ RUN apt-get update && apt-get install -y \ wget bash bc gcc sed patch patchutils tar bzip2 gzip xz-utils perl gawk gperf zip unzip diffutils lzop make file \ g++ xfonts-utils xsltproc default-jre-headless python3 \ libc6-dev libncurses5-dev \ - libjson-perl libxml-parser-perl \ + libjson-perl libxml-parser-perl libparse-yapp-perl \ golang-go \ git openssh-client \ --no-install-recommends \ diff --git a/tools/docker/xenial/Dockerfile b/tools/docker/xenial/Dockerfile index 574031a7c1..5dcbd002f0 100644 --- a/tools/docker/xenial/Dockerfile +++ b/tools/docker/xenial/Dockerfile @@ -21,7 +21,7 @@ RUN apt-get update && apt-get install -y \ wget bash bc gcc sed patch patchutils tar bzip2 gzip xz-utils perl gawk gperf zip unzip diffutils lzop make file \ g++ xfonts-utils xsltproc default-jre-headless python3 \ libc6-dev libncurses5-dev \ - libjson-perl libxml-parser-perl \ + libjson-perl libxml-parser-perl libparse-yapp-perl \ golang-go \ git openssh-client \ --no-install-recommends \ From 73ac19dc7008521b81ac1144a0af5f2ab11b6984 Mon Sep 17 00:00:00 2001 From: Jonas Karlman Date: Fri, 29 May 2020 20:57:32 +0000 Subject: [PATCH 2/4] tools/docker: add buster container --- tools/docker/buster/Dockerfile | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 tools/docker/buster/Dockerfile diff --git a/tools/docker/buster/Dockerfile b/tools/docker/buster/Dockerfile new file mode 100644 index 0000000000..bc1a2932cb --- /dev/null +++ b/tools/docker/buster/Dockerfile @@ -0,0 +1,31 @@ +FROM debian:buster + +ARG DEBIAN_FRONTEND=noninteractive + +RUN apt-get update \ + && apt-get dist-upgrade -y \ + && apt-get install -y locales sudo \ + && rm -rf /var/lib/apt/lists/* + +RUN echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen \ + && locale-gen en_US.UTF-8 \ + && update-locale LANG=en_US.UTF-8 LANGUAGE=en_US:en +ENV LANG=en_US.UTF-8 \ + LANGUAGE=en_US:en \ + LC_ALL=en_US.UTF-8 + +RUN adduser --disabled-password --gecos '' docker \ + && adduser docker sudo \ + && echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers + +RUN apt-get update && apt-get install -y \ + wget bash bc gcc sed patch patchutils tar bzip2 gzip xz-utils perl gawk gperf zip unzip diffutils lzop make file \ + g++ xfonts-utils xsltproc default-jre-headless python3 \ + libc6-dev libncurses5-dev \ + libjson-perl libxml-parser-perl libparse-yapp-perl \ + golang-go \ + git openssh-client \ + --no-install-recommends \ + && rm -rf /var/lib/apt/lists/* + +USER docker From b1f259b9f33cbfa652a7523451675b8a8a1b8ace Mon Sep 17 00:00:00 2001 From: Jonas Karlman Date: Sat, 30 May 2020 10:17:46 +0000 Subject: [PATCH 3/4] tools/docker: add focal container --- tools/docker/focal/Dockerfile | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 tools/docker/focal/Dockerfile diff --git a/tools/docker/focal/Dockerfile b/tools/docker/focal/Dockerfile new file mode 100644 index 0000000000..b6150078ea --- /dev/null +++ b/tools/docker/focal/Dockerfile @@ -0,0 +1,30 @@ +FROM ubuntu:focal + +ARG DEBIAN_FRONTEND=noninteractive + +RUN apt-get update \ + && apt-get dist-upgrade -y \ + && apt-get install -y locales sudo \ + && rm -rf /var/lib/apt/lists/* + +RUN locale-gen en_US.UTF-8 \ + && update-locale LANG=en_US.UTF-8 LANGUAGE=en_US:en +ENV LANG=en_US.UTF-8 \ + LANGUAGE=en_US:en \ + LC_ALL=en_US.UTF-8 + +RUN adduser --disabled-password --gecos '' docker \ + && adduser docker sudo \ + && echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers + +RUN apt-get update && apt-get install -y \ + wget bash bc gcc sed patch patchutils tar bzip2 gzip xz-utils perl gawk gperf zip unzip diffutils lzop make file \ + g++ xfonts-utils xsltproc default-jre-headless python3 \ + libc6-dev libncurses5-dev \ + libjson-perl libxml-parser-perl libparse-yapp-perl \ + golang-go \ + git openssh-client \ + --no-install-recommends \ + && rm -rf /var/lib/apt/lists/* + +USER docker From d7312385e0b16d92783b791f2a5304f91d992ba7 Mon Sep 17 00:00:00 2001 From: Jonas Karlman Date: Sat, 30 May 2020 10:18:09 +0000 Subject: [PATCH 4/4] 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.