Skip to content

Commit

Permalink
readme: improve Docker instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
grische committed Aug 17, 2023
1 parent a99676f commit 398acfd
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,21 @@ make

As the CI is using Ubuntu, only the Ubuntu dependencies are being tracked. To simplify building on other distros, containerised building is also possible:
```sh
docker build -t site-ffm -f Dockerfile_build .
docker build -t site-ffm-stable -f Dockerfile_build .
```
This will build the build Docker image. With the following export, the Makefile will then use the repo for building but will run inside an Ubuntu container.\
**Note**: If the working directory is a git worktree, add a volume mount for the main git folder.
```sh
docker run --rm -v $(pwd):/site-ffm:ro -v $(pwd)/gluon-build:/site-ffm/gluon-build:rw -v $(pwd)/output:/site-ffm/output:rw -w /site-ffm -u $UID site-ffm-next make
mkdir -p gluon-build output
docker run --rm -v $(pwd):/site-ffm:ro -v $(pwd)/gluon-build:/site-ffm/gluon-build:rw -v $(pwd)/output:/site-ffm/output:rw -w /site-ffm -u $UID site-ffm-stable make
```

#### Example
Full command for a [lantiq-xrx200](https://github.com/freifunk-gluon/gluon/blob/v2022.1/targets/lantiq-xrx200) build:

```sh
mkdir -p logs
docker run --rm -v $(pwd):/site-ffm:ro -v $(pwd)/gluon-build:/site-ffm/gluon-build:rw -v $(pwd)/output:/site-ffm/output:rw -w /site-ffm -u $UID site-ffm-next make V=s BROKEN=1 GLUON_TARGETS=lantiq-xrx200 |& tee logs/buildtest_lantiq-xrx200_$(date --iso=s).log
mkdir -p logs gluon-build output
docker run --rm -v $(pwd):/site-ffm:ro -v $(pwd)/gluon-build:/site-ffm/gluon-build:rw -v $(pwd)/output:/site-ffm/output:rw -w /site-ffm -u $UID site-ffm-stable make V=s GLUON_TARGETS=lantiq-xrx200 |& tee logs/build_lantiq-xrx200_$(date --iso=s).log
```

## Further Resources
Expand Down

0 comments on commit 398acfd

Please sign in to comment.