Franklin Wei | c5ed45d | 2019-07-28 15:39:25 -0400 | [diff] [blame^] | 1 | Docker build client |
| 2 | =================== |
| 3 | |
| 4 | This directory builds a Docker container image for a Rockbox build |
Franklin Wei | 02a6985 | 2019-07-21 18:17:37 -0400 | [diff] [blame] | 5 | client with all toolchains except android. |
| 6 | |
| 7 | There is a pre-built client available as built1n/rbclient on Docker |
| 8 | Hub if you would like to avoid having to build all the toolchains. See |
Franklin Wei | c5ed45d | 2019-07-28 15:39:25 -0400 | [diff] [blame^] | 9 | below for how to pull and run it. |
Franklin Wei | 02a6985 | 2019-07-21 18:17:37 -0400 | [diff] [blame] | 10 | |
Franklin Wei | c5ed45d | 2019-07-28 15:39:25 -0400 | [diff] [blame^] | 11 | Building from scratch |
| 12 | ===================== |
Franklin Wei | 02a6985 | 2019-07-21 18:17:37 -0400 | [diff] [blame] | 13 | |
Franklin Wei | c5ed45d | 2019-07-28 15:39:25 -0400 | [diff] [blame^] | 14 | 1. Make sure you have Docker installed and running (i.e. `systemctl |
| 15 | start docker'). |
Franklin Wei | 02a6985 | 2019-07-21 18:17:37 -0400 | [diff] [blame] | 16 | |
Franklin Wei | c5ed45d | 2019-07-28 15:39:25 -0400 | [diff] [blame^] | 17 | 2. Build the image: |
Franklin Wei | 02a6985 | 2019-07-21 18:17:37 -0400 | [diff] [blame] | 18 | |
Franklin Wei | c5ed45d | 2019-07-28 15:39:25 -0400 | [diff] [blame^] | 19 | docker build . -t myclient |
Franklin Wei | 02a6985 | 2019-07-21 18:17:37 -0400 | [diff] [blame] | 20 | |
Franklin Wei | c5ed45d | 2019-07-28 15:39:25 -0400 | [diff] [blame^] | 21 | This will build the image and tag it as `myclient.' The build process |
| 22 | can take several hours, as it downloads and compiles every Rockbox |
| 23 | toolchain. Fortunately, Docker will cache intermediate images, saving |
| 24 | you work if you must rebuild. |
Franklin Wei | 02a6985 | 2019-07-21 18:17:37 -0400 | [diff] [blame] | 25 | |
Franklin Wei | c5ed45d | 2019-07-28 15:39:25 -0400 | [diff] [blame^] | 26 | 3. Run your image: |
Franklin Wei | 02a6985 | 2019-07-21 18:17:37 -0400 | [diff] [blame] | 27 | |
Franklin Wei | c5ed45d | 2019-07-28 15:39:25 -0400 | [diff] [blame^] | 28 | docker run -e USER=your username -e PASS=anything -e NAME=clientname \ |
| 29 | myclient |
| 30 | |
| 31 | This will spin up a build image container in the background. |
Franklin Wei | 02a6985 | 2019-07-21 18:17:37 -0400 | [diff] [blame] | 32 | |
| 33 | You can also run a bash shell interactively by issuing: |
| 34 | |
Franklin Wei | c5ed45d | 2019-07-28 15:39:25 -0400 | [diff] [blame^] | 35 | docker run -it myclient bash |
Franklin Wei | 02a6985 | 2019-07-21 18:17:37 -0400 | [diff] [blame] | 36 | |
Franklin Wei | c5ed45d | 2019-07-28 15:39:25 -0400 | [diff] [blame^] | 37 | This will drop you into a fully-equipped Rockbox development |
Franklin Wei | 02a6985 | 2019-07-21 18:17:37 -0400 | [diff] [blame] | 38 | environment. |
| 39 | |
Franklin Wei | c5ed45d | 2019-07-28 15:39:25 -0400 | [diff] [blame^] | 40 | Prebuilt image |
| 41 | ============== |
Franklin Wei | 02a6985 | 2019-07-21 18:17:37 -0400 | [diff] [blame] | 42 | |
Franklin Wei | c5ed45d | 2019-07-28 15:39:25 -0400 | [diff] [blame^] | 43 | Run: |
Franklin Wei | e499b75 | 2019-07-28 15:31:30 -0400 | [diff] [blame] | 44 | |
Franklin Wei | c5ed45d | 2019-07-28 15:39:25 -0400 | [diff] [blame^] | 45 | docker pull built1n/rbclient |
| 46 | |
| 47 | This will download a pre-built image from Docker Hub (fairly large, |
| 48 | will take some time). You can then use all the commands above, with |
| 49 | `myclient' replaced with `built1n/rbclient'. |