From 5ecdef74fa736e2377b2123e3b28a6bd48b8d178 Mon Sep 17 00:00:00 2001 From: Grische <2787581+grische@users.noreply.github.com> Date: Wed, 1 Jan 2025 15:56:28 +0100 Subject: [PATCH] readme: change Docker tags to use branch name There is no more "stable", "next" and "legacy" (cherry picked from commit ee70b9fcbe80f7c05e957321ee2d68a877e74731) --- README.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index eb97a4f..d67e6d3 100644 --- a/README.md +++ b/README.md @@ -24,22 +24,26 @@ make ### Containerised building 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-stable -f Dockerfile_build . +docker build -t site-ffm-$(git rev-parse --abbrev-ref HEAD) -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 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 +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-$(git rev-parse --abbrev-ref HEAD) 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 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 +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-$(git rev-parse --abbrev-ref HEAD) make V=s GLUON_TARGETS=lantiq-xrx200 |& tee logs/build_lantiq-xrx200_$(date --iso=s).log ``` ## Further Resources