diff options
| author | Hugo Hromic <hhromic@users.noreply.github.com> | 2019-07-30 12:38:26 +0100 |
|---|---|---|
| committer | XECDesign <XECDesign@users.noreply.github.com> | 2019-07-30 12:38:26 +0100 |
| commit | 920e22bdc5224238881d8a87d17efa9d6f1e991c (patch) | |
| tree | 876ac4101f8add095ec16d1c2a61f7ac431e2171 /scripts/common | |
| parent | 5436273ec728c8369dab9c08f2739805f20510f7 (diff) | |
Ensure that the configuration file is an absolute path in Docker build (#306)
* Use `&&` instead of `;` in Docker pipeline
* In case of error, `&&` does not continue execution
* Silence shellcheck warning
* SC2086: Double quote to prevent globbing and word splitting.
* Ensure that the configuration file is an absolute path in Docker build
The specific problem is in commit 2ddd7c1, where the passed config file
(using the `-c` option) is now mounted inside the container using the
`--volume src:dest:opt` Docker option.
The problem is that Docker requires absolute paths for mounting single
files inside the container, otherwise it silently tries to mount a volume
name instead as an empty directory. Therefore the Docker build no longer
works with the following invocation forms (relative config-paths):
./build-docker.sh -c myconfig
/path/to/build-docker.sh -c myconfig # also doesn't work
This commit uses `realpath` (included in coreutils) in the Docker build
script to ensure that the passed configuration file is always an
absolute path before passing it to Docker.
Diffstat (limited to 'scripts/common')
0 files changed, 0 insertions, 0 deletions
