#Example using Go SDK to push to Azure using credentials

1 messages · Page 1 of 1 (latest)

cursive wing
#

I have the following Go code, and am wanting to Publish my docker image upto Azure. Could someone show me an example of how I would adjust it to include Azure credentials please?

Thanks

    src := client.Host().Directory(".")
    _, err = src.
        DockerBuild().
        Publish(ctx, "storage.azurecr.io/ui/test/"+"test123")
hard siren
#

I don't have an exact answer rather a simple suggestion a simple docker login using something like os.exec and the prescribed way for azure registry auth should work, so basically IMHO you can may be either do a docker login using the docker cli in your code or if there is any azure sdk call to accomplish the same try that and things should work.

grim adder