Skip to content

Can not create Azure docker container using AZ Container Create #15334

@textminer

Description

@textminer

Describe the bug

az container create breaks while trying to create a docker container.

Command Name
az container create

Errors:

No module named 'azure.mgmt.network.v2018_08_01'
Traceback (most recent call last):
Temp\pip-unpacked-wheel-tuw8_17y\knack\cli.py, ln 215, in invoke
cli\core\commands\__init__.py, ln 654, in execute
cli\core\commands\__init__.py, ln 718, in _run_jobs_serially
cli\core\commands\__init__.py, ln 711, in _run_job
Local\Temp\pip-unpacked-wheel-cpn0gwyu\six.py, ln 703, in reraise
cli\core\commands\__init__.py, ln 688, in _run_job
cli\core\commands\__init__.py, ln 325, in __call__
azure\cli\core\__init__.py, ln 784, in default_command_handler
cli\command_modules\container\custom.py, ln 190, in create_container
cli\command_modules\container\custom.py, ln 286, in _get_vnet_network_profile
azure\mgmt\network\_network_management_client.py, ln 5336, in subnets
ModuleNotFoundError: No module named 'azure.mgmt.network.v2018_08_01'

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

  • Put any pre-requisite steps here...
  • az login
  • az container create --name skh-cdqa-container-dev --resource-group SalesKnowledgeHub-01-rg --image [my registry].azurecr.io/cdqa-app:1.0 --vnet /subscriptions/[my subscription]/resourceGroups/network-01-rg/providers/Microsoft.Network/virtualNetworks/skh-we-vnet --vnet-address-prefix 10.102.32.0/25 --subnet skh-we-vnet-subnet-01 --subnet-address-prefix 10.102.32.0/25 --os-type Linux --cpu 2 --memory 16 --ports 5000

Expected Behavior

a docker container should be created in Azure

Environment Summary

Windows-10-10.0.18362-SP0
Python 3.6.8
Installer: MSI

azure-cli 2.12.1

Additional Context

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions