aws-codebuild-docker-images
aws-codebuild-docker-images copied to clipboard
Trouble with Privileged mode
Hi Folks,
I'm having trouble running the following command:
$ ./codebuild_build.sh -i aws/codebuild/standard:4.0 -a . -b testspec.yml -d -e .env
Here's the resulting command from the script:
docker run -it -v /var/run/docker.sock:/var/run/docker.sock \
-e "IMAGE_NAME=aws/codebuild/standard:4.0" \
-e "ARTIFACTS=/Users/cajund/IdeaProjects/ctw-selenium/." \
-e "SOURCE=/Users/cajund/IdeaProjects/ctw-selenium" \
-e "BUILDSPEC=/Users/cajund/IdeaProjects/ctw-selenium/testspec.yml" \
-v "/Users/cajund/IdeaProjects/ctw-selenium:/LocalBuild/envFile/" \
-e "ENV_VAR_FILE=.env" -e "DOCKER_PRIVILEGED_MODE=TRUE" \
-e "INITIATOR= cajund" amazon/aws-codebuild-local:latest
I'm getting an error that you would normally get when not running in privileged mode, but I am passing in the flag and it is appearing in the command. When I run this:
docker run -it --privileged aws/codebuild/standard:4.0 bash
I can run docker commands with no problem. But with the included codebuild_build.sh
script, I can't. This was working recently as well - so did something change in the repo recently? Any suggestions on what else I can check?
Thanks for your help.