I have the following: test.ini
BUILD_ARGS='--build-arg user="test user" --build-arg pass=testPass'
test.sh
#!/bin/bash
set -x
source test.ini
docker build -t test:test ${BUILD_ARGS} .
Output of test.sh
+ source test.ini
++ BUILD_ARGS='--build-arg smb_user="test user" --build-arg smb_pass=testPass '
+ docker build -t test:test --build-arg 'user="test' 'user"' --build-arg pass=testPass .
Why are extra single quotes being added in between "test" and "user"? I would expect the command to be executed as:
docker build -t test:test --build-arg user="test user" --build-arg pass=testPass .