我使用以下命令确认这aws/codebuild/java:openjdk-8
是精选的 CodeBuild 映像之一。
$ aws codebuild list-curated-environment-images | grep -A 1 openjdk-8
"name": "aws/codebuild/java:openjdk-8",
"description": "AWS CodeBuild - Java 8"
尽管aws/codebuild/java:openjdk-8
是经过策划的映像,但当我尝试使用该映像和 PrivilegedMode=true 参数创建构建项目时,我收到一个没有意义的 4XX 错误:“只能为自定义或 AWS CodeBuild Docker 策划的项目设置 PrivilegedMode图片。”
9 [main] INFO org.janusgraph.codepipelines.AwsCodePipelinesCi -
{
Name: j1pass-bdb-project,
Source: {Type: CODEPIPELINE,},
Artifacts: {Type: CODEPIPELINE, Name: null-artifacts,Packaging: NONE},
Environment: {Type: LINUX_CONTAINER,
Image: aws/codebuild/java:openjdk-8,
ComputeType: BUILD_GENERAL1_LARGE,
EnvironmentVariables: [{Name: MODULE,Value: janusgraph-berkeleyje}],
PrivilegedMode: true},
ServiceRole: arn:aws:iam::############:role/cbjanus,
TimeoutInMinutes: 480
}
1454 [main] ERROR org.janusgraph.codepipelines.AwsCodePipelinesCi -
PrivilegedMode can only be set for projects with custom or AWS CodeBuild Docker
curated images. (Service: AWSCodeBuild; Status Code: 400;
Error Code: InvalidInputException; Request ID: 89ab67a0-4d00-11e7-8da7-bdeb9326cb3c)
com.amazonaws.services.codebuild.model.InvalidInputException: PrivilegedMode can
only be set for projects with custom or AWS CodeBuild Docker curated images.
(Service: AWSCodeBuild; Status Code: 400;
Error Code: InvalidInputException; Request ID: 89ab67a0-4d00-11e7-8da7-bdeb9326cb3c)