Skip to content

Commit

Permalink
Update el_docker
Browse files Browse the repository at this point in the history
Add support for supplying additional flags to docker such as mounting additional volumes.

This is useful e.g. if building via bazel and requesting a build using docker.
The need stems from that el_docker is executed in the bazel sandbox.
In the bazel sandbox all input sources only exists as symlinks.
and docker won't have access to the real source files, unless the repo root is also added as a mounted volume.

This is oneway of enabling this
  • Loading branch information
solsjo authored and olofk committed Oct 2, 2022
1 parent ac974d7 commit b8d9a9a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/el_docker
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,15 @@ if [c for c in containers if c["tool"] == toolname]:
logger.error("ERROR: Tool {} not found in container list.".format(toolname))
exit(1)

extra = os.environ["EDALIZE_EXTRA_DOCKER_FLAGS"].split(" ")
prefix = [
"docker",
"run",
"--rm",
"-v",
build_root + ":/src",
# '-e', dockerEnv,
] + extra + [
"-u",
f"{os.getuid()}:{os.getgid()}",
"-w",
Expand Down

0 comments on commit b8d9a9a

Please sign in to comment.