Hi again, Trying to create a docker image and push...
# getting-started
e
Hi again, Trying to create a docker image and push to aws ECR, seems this document is outdated : https://www.pulumi.com/docs/clouds/aws/guides/
Copy code
repository = awsx.ecr.Repository("repository")
image = awsx.ecr.Image("image",
    repository_url=repository.url,
    path="./app")
Error: the "path" is unexpected argument to the function. the documentation for Image class also doesn't have such a parameter:
Copy code
def Image(resource_name: str,
          opts: Optional[ResourceOptions] = None,
          args: Optional[Mapping[str, str]] = None,
          builder_version: Optional[BuilderVersion] = None,
          cache_from: Optional[Sequence[str]] = None,
          context: Optional[str] = None,
          dockerfile: Optional[str] = None,
          extra_options: Optional[Sequence[str]] = None,
          platform: Optional[str] = None,
          repository_url: Optional[str] = None,
          target: Optional[str] = None)
any idea? My Dockerfile is included in a subfolder of "backend" in the project
l
That documentation is from before v4 of the Docker provider. Either downgrade your provider, or use the provider's current documentation: https://www.pulumi.com/registry/packages/docker/api-docs/image/
Be aware that there are Image classes in a few libraries and providers, and they're not the same. The Docker provider Image and the AWSX ECR Image are not the same class.
s
In the event of using the v4 provider,
context
is likely what you’ll want to use in place of
path
.
e
thanks,
That documentation is from before v4 of the Docker provider.
how do I know this? how can I explore the latest documents?
s
It would seem the Crosswalk page you linked (found at https://www.pulumi.com/docs/clouds/aws/guides/) hasn’t been updated for the latest releases of Crosswalk for AWS; I apologize for that oversight. I’ll file an issue on our docs repo. In the meantime, if you use the link you shared for the
Image
resource you’ll be looking at the most recent version of the API docs for that resource (you’ll note that
path
is not present but
context
is, for example).