7f2020f904
Currently, the docker-run script starts a container based on the reference image, in which the user has UID:GID set to 1000:1000, which may or may not be the same as local user uses, which may prevent the commands in the container from creating files, which foils the plan of using the container to run a build... Additionally, the paths in the container differ from the paths the user expects, as the current Buildroot tree is mounted over the in-container user home directory. This is a bit confusing... Finally, the container is left hanging around after the command finishes, and thus there are as many lingering containers as the user runs docker-run. This is not very nice... We fix all of that (yeah, should be different patches, but meh): - we use --mount instead of -v, which allows us to bind-mount the Buildroot tree at the same place in the container, as Docker will create the destination if it does not exist, while -v seems to expect it to exist [0]. - as a consequence, we can also set the working directory as the Buildroot top-directory; - use --user to force the same UID:GID in the container as the local user, so that files created in the container belong to the local user, and so that files from the local user are accessible from the container; - use --rm to remove the container once it terminates; starting a new container is very quick anyway, so it is as good as re-using a previous container. [0] the documentation is not clear about that. It clearly states that the host directory (i.e. the origin, the source) is created if missing, but it says nothing of the destination: https://docs.docker.com/engine/reference/commandline/run/#mount-volume--v---read-only Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr> Cc: Luca Ceresoli <luca@lucaceresoli.net> Cc: Giulio Benetti <giulio.benetti@benettiengineering.com> Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Reviewed-by: Giulio Benetti <giulio.benetti@benettiengineering.com> Tested-by: Giulio Benetti <giulio.benetti@benettiengineering.com> Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> |
||
---|---|---|
.. | ||
checkpackagelib | ||
brmake | ||
check-package | ||
config | ||
diffconfig | ||
docker-run | ||
genrandconfig | ||
get-developers | ||
getdeveloperlib.py | ||
readme.txt | ||
scancpan | ||
scanpypi | ||
size-stats-compare | ||
test-pkg |
This directory contains various useful scripts and tools for working with Buildroot. You need not add this directory in your PATH to use any of those tools, but you may do so if you want. brmake a script that can be run instead of make, that prepends the date in front of each line, redirects all of the build output to a file ("'br.log' in the current directory), and just outputs the Buildroot messages (those lines starting with >>>) on stdout. Do not run this script for interactive configuration (e.g. menuconfig) or on an unconfigured directory. The output is redirected so you will see nothing. check-package a script that checks the coding style of a package's Config.in and .mk files, and also tests them for various types of typoes. genrandconfig a script that generates a random configuration, used by the autobuilders (http://autobuild.buildroot.org). It selects a random toolchain from support/config-fragments/autobuild and randomly selects packages to build. get-developpers a script to return the list of people interested in a specific part of Buildroot, so they can be Cc:ed on a mail. Accepts a patch as input, a package name or and architecture name. scancpan a script to create a Buildroot package by scanning a CPAN module description. scanpypi a script to create a Buildroot package by scanning a PyPI package description. size-stats-compare a script to compare the rootfs size between two different Buildroot configurations. This can be used to identify the size impact of a specific option, of a set of specific options, or of an update to a newer Buildroot version... test-pkg a script that tests a specific package against a set of various toolchains, with the goal to detect toolchain-related dependencies (wchar, threads...)