How to Launch Ubuntu Container on Azure

How to Launch Ubuntu Container on Azure

TechHara

55 лет назад

519 Просмотров

For Azure newbies who just want to launch Ubuntu instance on Azure, I will go through step by step to launch Ubuntu image on Azure. I will show you both GUI and CLI ways to do this. Prepare to spend 10 cents or so to follow this tutorial.

Pre-requisite:
Azure account

Azure portal:
www.portal.azure.com

Install Azure CLI:
https://learn.microsoft.com/en-us/cli/azure/install-azure-cli

Ubuntu image address:
registry.hub.docker.com/library/ubuntu

Command override:
["tail", "-f", "/dev/null"]

Create the instance:
az container create -g linux -n ubuntu --restart-policy Never --command-line "tail -f /dev/null" --image registry.hub.docker.com/library/ubuntu

Attach to the instance: az container exec -g linux -n ubuntu --exec-command "/bin/bash"

Stop the instance:
az container stop -g linux -n ubuntu

Restart the instance:
az container start -g linux -n ubuntu

Delete the instance:
az container delete -g linux -n ubuntu

Тэги:

#azure #linux #ubuntu #container #docker
Ссылки и html тэги не поддерживаются


Комментарии: