aws / aws/aws-codebuild-docker-images

Trouble with Privileged mode

Open
#445 0 comments 0 reactions 0 assignees View on GitHub
CodeBuild-local
Dominant language
Dockerfile
Stars
1.2k
Forks
971
Avg merge
2h 47m
Merged PRs (30d)
1

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.