@@ -43,6 +43,7 @@ function usage {
43
43
echo " -p Used to specify the AWS CLI Profile."
44
44
echo " -b FILE Used to specify a buildspec override file. Defaults to buildspec.yml in the source directory."
45
45
echo " -m Used to mount the source directory to the customer build container directly."
46
+ echo " -d Used to run the build container in docker privileged mode."
46
47
echo " -e FILE Used to specify a file containing environment variables."
47
48
echo " (-e) File format expectations:"
48
49
echo " * Each line is in VAR=VAL format"
@@ -57,14 +58,16 @@ image_flag=false
57
58
artifact_flag=false
58
59
awsconfig_flag=false
59
60
mount_src_dir_flag=false
61
+ docker_privileged_mode_flag=false
60
62
61
- while getopts " cmi :a:s:b:e:l:p:h" opt; do
63
+ while getopts " cmdi :a:s:b:e:l:p:h" opt; do
62
64
case $opt in
63
65
i ) image_flag=true; image_name=$OPTARG ;;
64
66
a ) artifact_flag=true; artifact_dir=$OPTARG ;;
65
67
b ) buildspec=$OPTARG ;;
66
68
c ) awsconfig_flag=true;;
67
69
m ) mount_src_dir_flag=true;;
70
+ d ) docker_privileged_mode_flag=true;;
68
71
s ) source_dirs+=(" $OPTARG " );;
69
72
e ) environment_variable_file=$OPTARG ;;
70
73
l ) local_agent_image=$OPTARG ;;
@@ -160,6 +163,11 @@ then
160
163
docker_command+=" -e \" MOUNT_SOURCE_DIRECTORY=TRUE\" "
161
164
fi
162
165
166
+ if $docker_privileged_mode_flag
167
+ then
168
+ docker_command+=" -e \" DOCKER_PRIVILEGED_MODE=TRUE\" "
169
+ fi
170
+
163
171
if isOSWindows
164
172
then
165
173
docker_command+=" -e \" INITIATOR=$USERNAME \" "
0 commit comments