fresh-spring-82225
03/29/2023, 7:11 PMawsx.ecr.Image
to docker.Image
?const imageRepo = new awsx.ecr.Repository(`${name}-repo`, {
name: `${name}-repo`,
})
const image = new awsx.ecr.Image(`${name}-image`, {
repositoryUrl: imageRepo.url,
path: imageDir,
extraOptions: ["--platform", "linux/amd64"],
const imageRepo = new awsx.ecr.Repository(`${name}-repo`, {
name: `${name}-repo`,
})
const password = new local.Command(`${name}-get-ecr-password`, {
create: "aws ecr get-login-password --region us-east-2"
})
const image = new docker.Image(`${name}-image`, {
registry: {
server: imageRepo.url,
username: "AWS",
password: password.stdout
},
build: {
context: imageDir,
platform: "linux/amd64",
args: buildArgs
},
imageName: imageRepo.url.apply(url => `${url}:latest`),
})
latest
awsx.ecr.Image
uses. Not sure it matters!
Inspired by https://pulumi-community.slack.com/archives/CJ909TL6P/p1678919350593459?thread_ts=1678915866.706349&cid=CJ909TL6Perror hashing dockerfile "test-image/Dockerfile": could not open file test-image/Dockerfile: open test-image\test-image\Dockerfile: The system cannot find the path specified.
even with @billowy-army-68599’s latest suggestion.
Then I did a pulumi refresh
and then it worked :melting_face:context
needs to start with ./
if it's not .
.