Hey all, I have been exploring a way to tag a dock...
# getting-started
b
Hey all, I have been exploring a way to tag a docker image when pushing it with AWS Crosswalk. Crosswalk implementation. Currently, this implementation does not tag the images it pushes to ECR.
Copy code
repository = awsx.ecr.Respository(...)

image = awsx.ecr.Image(
    "scheduler",
    path="../",
    dockerfile="scheduler/Dockerfile",
    extra_options={
        "-t",
        "1.0.0"
    },
    args={
       ...
    },
)
This implementation does, but is inconsistent and uses Pulumi-docker. I’m currently getting bugs fairly frequently trying to build and push this way, so Crosswalk would be preferable as it was very consistent (just didn’t tag).
Copy code
repository = awsx.ecr.Respository(...)

image = docker.Image(
    name="scheduler",
    image_name=repository.url.apply(lambda url: f"{url}:{scheduler_version}"),
    build=docker.DockerBuild(
        context="../",  # type: ignore
        dockerfile="scheduler/Dockerfile",  # type: ignore
        args={
            ...
        }
    ),
    registry=None,
)
Is there a way I’m not seeing to tag using AWSx?