Azure-cli: az container create with file input and cli arguments

Created on 17 Oct 2018  路  6Comments  路  Source: Azure/azure-cli

Describe the bug
When using an input file to create a multi-container container group, I can't specify the registry credentials via CLI arguments.

az container create --resource-group $RG --file deploy.yaml \
                                --registry-login-server $REGISTRY \
                                --registry-username $NAME \
                                --registry-password $PASSWORD
Multiple error occurred: 'BadRequest':'InaccessibleImage':'The image '$REGISTRY/app:latest' in container group '$RG' is not accessible.

To Reproduce
Run the command above without creds in the input yaml file.

Expected behavior
I expected to use an input file with creds on the cli as the file will be git which shouldn't have those secrets. Idea here to to automate this with e.g Jenkins and use environment variables for the ACR creds.

Environment summary
azure-cli (2.0.47) installed on Fedora via dnf.

Additional context
N/A

Container Instances Service Attention bug customer-reported

All 6 comments

Making a note as I haven't tested this yet, ideally environment variables would behave the same. Some specified in the yaml and others via the CLI.

You ever get this figured out?

I have that error too

Hello everybody, any update about this issue?

I cannot use the "az container create" cli command and use both --file and registry params credentials (--registry-login-server, --registry-password and --registry-username)
I need file to setup livenessProbe parameters, and I need credentials via cli instead saving them in the file for the pipeline security.

Best.
Francesco.

container

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @dkkapur.

Was this page helpful?
0 / 5 - 0 ratings