Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CodeBuild: Can't run docker image on ARM build instance #24342

Closed
BastiQ opened this issue Feb 26, 2023 · 2 comments · Fixed by #26121
Closed

CodeBuild: Can't run docker image on ARM build instance #24342

BastiQ opened this issue Feb 26, 2023 · 2 comments · Fixed by #26121
Labels
@aws-cdk/aws-codebuild Related to AWS CodeBuild bug This issue is a bug. feature-request A feature should be added or improved. p2

Comments

@BastiQ
Copy link

BastiQ commented Feb 26, 2023

Describe the bug

Hey there!

It seems like, so far, the LinuxArmBuildImage class doesn't support the from_docker_registry function [1]. But the LinuxBuildImage class does. This seems weird to me since CodeBuild is generally supporting the use of ARM images [2].

Not sure if this is a bug or a future request, feel free to change.

[1] https://docs.aws.amazon.com/cdk/api/v2/python/aws_cdk.aws_codebuild/README.html#images and https://docs.aws.amazon.com/cdk/api/v2/python/aws_cdk.aws_codebuild/LinuxArmBuildImage.html
[2] https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html###

Reproduction Steps

my_codebuild_project = codebuild.Project(
    self,
    "MyCodeBuildProject",
    project_name="MyCodeBuildProject",
    build_spec=codebuild.BuildSpec.from_object(
        {
            "version": "0.2",
            "phases": {
                "build": {
                    "commands": [
                        "echo hi",
                    ]
                }
            },
        }
    ),
    environment=codebuild.BuildEnvironment(
        build_image=codebuild.LinuxBuildImage.from_docker_registry( # can't use LinuxArmBuildImage
            f"public.ecr.aws/sam/build-python3.9:latest-arm64" # runs into error with the -arm64 ending
        ),
        compute_type=codebuild.ComputeType.LARGE,
        privileged=True,
    ),
)

Possible Solution

LinuxArmBuildImage should also support from_docker_registry function

Additional Information/Context

No response

CDK CLI Version

2.66.1

Framework Version

No response

Node.js Version

v16.16.0

OS

MacOS

Language

Python

Language Version

3.9.15

Other information

No response

@BastiQ BastiQ added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Feb 26, 2023
@github-actions github-actions bot added the @aws-cdk/aws-codebuild Related to AWS CodeBuild label Feb 26, 2023
@pahud
Copy link
Contributor

pahud commented Feb 28, 2023

Yes. This is related to #24367 and we definitely need to add this feature on it. Any PR submission is welcome and appreciated!

@pahud pahud added feature-request A feature should be added or improved. p2 and removed needs-triage This issue or PR still needs to be triaged. labels Feb 28, 2023
@mergify mergify bot closed this as completed in #26121 Jul 18, 2023
mergify bot pushed a commit that referenced this issue Jul 18, 2023
)

Added support for usage of docker registry images when configuring CodeBuild Linux with ARM images

Closes #24367 and closes #24342

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

bmoffatt pushed a commit to bmoffatt/aws-cdk that referenced this issue Jul 29, 2023
…#26121)

Added support for usage of docker registry images when configuring CodeBuild Linux with ARM images

Closes aws#24367 and closes aws#24342

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-codebuild Related to AWS CodeBuild bug This issue is a bug. feature-request A feature should be added or improved. p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants