@@ -43,6 +43,7 @@ function usage {
4343 echo " -p Used to specify the AWS CLI Profile."
4444 echo " -b FILE Used to specify a buildspec override file. Defaults to buildspec.yml in the source directory."
4545 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."
4647 echo " -e FILE Used to specify a file containing environment variables."
4748 echo " (-e) File format expectations:"
4849 echo " * Each line is in VAR=VAL format"
@@ -57,14 +58,16 @@ image_flag=false
5758artifact_flag=false
5859awsconfig_flag=false
5960mount_src_dir_flag=false
61+ docker_privileged_mode_flag=false
6062
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
6264 case $opt in
6365 i ) image_flag=true; image_name=$OPTARG ;;
6466 a ) artifact_flag=true; artifact_dir=$OPTARG ;;
6567 b ) buildspec=$OPTARG ;;
6668 c ) awsconfig_flag=true;;
6769 m ) mount_src_dir_flag=true;;
70+ d ) docker_privileged_mode_flag=true;;
6871 s ) source_dirs+=(" $OPTARG " );;
6972 e ) environment_variable_file=$OPTARG ;;
7073 l ) local_agent_image=$OPTARG ;;
@@ -160,6 +163,11 @@ then
160163 docker_command+=" -e \" MOUNT_SOURCE_DIRECTORY=TRUE\" "
161164fi
162165
166+ if $docker_privileged_mode_flag
167+ then
168+ docker_command+=" -e \" DOCKER_PRIVILEGED_MODE=TRUE\" "
169+ fi
170+
163171if isOSWindows
164172then
165173 docker_command+=" -e \" INITIATOR=$USERNAME \" "
0 commit comments