Update build-docker.sh for other platforms
The helper realpath does not exist on OS X. Check for the implementation before using. Testing on Docker for Mac. Docker for Mac requires that you increase the size of the Docker VM to match the disk space used in the build. I am using 256G. Allow DOCKER to be set. On systems without open docker commands, support DOCKER="sudo docker" bash build-docker.sh. Testing this on ClearLinux.
This commit is contained in:
parent
95ba042c83
commit
9178870e6f
|
@ -3,7 +3,8 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||||
|
|
||||||
BUILD_OPTS="$*"
|
BUILD_OPTS="$*"
|
||||||
|
|
||||||
DOCKER="docker"
|
# Set DOCKER="sudo docker" if needed
|
||||||
|
DOCKER=${DOCKER:-"docker"}
|
||||||
|
|
||||||
if ! ${DOCKER} ps >/dev/null 2>&1; then
|
if ! ${DOCKER} ps >/dev/null 2>&1; then
|
||||||
DOCKER="sudo docker"
|
DOCKER="sudo docker"
|
||||||
|
@ -31,7 +32,10 @@ do
|
||||||
done
|
done
|
||||||
|
|
||||||
# Ensure that the configuration file is an absolute path
|
# Ensure that the configuration file is an absolute path
|
||||||
CONFIG_FILE=$(realpath -s "$CONFIG_FILE")
|
# on OS X realpath is not available
|
||||||
|
if [ -x /usr/bin/realpath ]; then
|
||||||
|
CONFIG_FILE=$(realpath -s "$CONFIG_FILE")
|
||||||
|
fi
|
||||||
|
|
||||||
# Ensure that the confguration file is present
|
# Ensure that the confguration file is present
|
||||||
if test -z "${CONFIG_FILE}"; then
|
if test -z "${CONFIG_FILE}"; then
|
||||||
|
|
Loading…
Reference in New Issue
Block a user