You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 32edd3d
Browse filesBrowse the repository at this point in the historyBrowse files
The `infinitime-build` image contains all the dependencies you need.
27
-
The default `CMD` will compile sources found in `/sources`, so you need only mount your code.
24
+
## Provision the image
28
25
29
-
Before continuing, make sure you first build the image as indicated in the [Build the image](#build-the-image) section, or check the [Using the image from Docker Hub](#using-the-image-from-docker-hub) section if you prefer to use a pre-made image.
26
+
Before continuing, the build image needs to be either build locally or pulled
27
+
from Docker Hub, as described in the two sections below:
30
28
31
-
This example will build the firmware, generate the MCUBoot image and generate the DFU file.
32
-
For cloning the repo, see [these instructions](../doc/buildAndProgram.md#clone-the-repo). Outputs will be written to **<project_root>/build/output**:
The image is available via Docker Hub for both the amd64 and arm64v8 architectures at [infinitime/infinitime-build](https://hub.docker.com/repository/docker/infinitime/infinitime-build).
43
+
The image is available via Docker Hub for both the amd64 and arm64v8 architectures at
@@ -64,12 +55,35 @@ The default `latest` tag *should* automatically identify the correct image archi
64
55
65
56
- For ARM64v8 (ARM64/aarch64) systems: `docker pull --platform linux/arm64 infinitime/infinitime-build`
66
57
67
-
## Build the image
58
+
## Run a container to build the project
68
59
69
-
You can build the image yourself if you like!
60
+
The `infinitime-build` image contains all the dependencies you need.
61
+
The default `CMD` will compile sources found in `/sources`, so you need only mount your code.
70
62
71
-
The following commands must be run from the root of the project. This operation will take some time but, when done, a new image named *infinitime-build* is available.
63
+
This example will build the firmware, generate the MCUBoot image and generate the DFU file.
64
+
Outputs will be written to **<project_root>/build/output**:
72
65
73
-
```bash
74
-
docker build -t infinitime-build ./docker
66
+
```sh
67
+
cd<project_root># e.g. cd ./work/Pinetime
68
+
docker run --rm -it -v ${PWD}:/sources infinitime-build
69
+
```
70
+
71
+
If the docker service is running as `root`, the build process inside the
72
+
container also runs as `root`, which is not convenient as all the files
73
+
generated by the build will also belong to `root`. The parameter `--user`
74
+
overrides this behaviour. The command below ensures that all files are created
0 commit comments