Skip to content

Instantly share code, notes, and snippets.

@janjaali
Last active April 16, 2020 14:28
Show Gist options
  • Save janjaali/9d32d4ad72c5930d587ee84cc8397ab6 to your computer and use it in GitHub Desktop.
Save janjaali/9d32d4ad72c5930d587ee84cc8397ab6 to your computer and use it in GitHub Desktop.

Creates an "Azure Container Instances" instance

az container create --resource-group {resource_group} `
                    --name {name} `
                    --location westeurope `
                    --image {docker_image} `
                    --os-type Linux `
                    --cpu 1 `
                    --memory 0.5 `
                    --ip-address Public `
                    --ports 80 `
                    --dns-name-label {dns_name_label} `
                    --restart-policy OnFailure `
                    --environment-variables `
                        KEY01=VALUE01

Creates an "Azure Container Instances" instance with a private docker image

az container create --resource-group {resource_group} `
                    --name {name} `
                    --location westeurope `
                    --image {docker_image} `
                    --registry-login-server {registry_login_server} `
                    --registry-username {registry_username} `
                    --registry-password {registry_password} `
                    --os-type Linux `
                    --cpu 1 `
                    --memory 0.5 `
                    --ip-address Public `
                    --ports 80 `
                    --dns-name-label {dns_name_label} `
                    --restart-policy OnFailure `
                    --environment-variables `
                        KEY01=VALUE01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment