09/10/2018, 5:06 AM
Hi, I’m trying to use
to build an image which is subsequently used for a k8s deployment. The image shall be pushed to a private GCR registry. This is a subset of my current code:
Copy code
const imageName = 'prediction-container-manager-router';

const image = docker.buildAndPushImage(
    context: './router',
    dockerfile: './router/Dockerfile'
  async () => ({
    registry: '<|>',
    username: 'oauth2accesstoken',
    password: execSync('gcloud auth print-access-token').toString('utf8')
Pulumi up fails with
Copy code
logging in to registry...

  pulumi:pulumi:Stack: prediction-container-manager-prediction-container-manager-api-cluster-dev-b
    info: denied: requested access to the resource is denied
    error: [runtime] Docker push of image 'solvvy-dev/prediction-container-manager-router' failed with exit code: 1
which is not a very helpful error. Is there some example of how to use gcr? Also what should I pass as
/ the forth parameter of docker.buildAndPushImage to perhaps get some more useful log output? Currently I’m just passing