I have followed the tutorial listed in Azure's official documentation. Automate VM Deployment
Here are the steps I followed in Azure's official tutorial.
## Install packages on first boot
package_upgrade: true
packages:
- docker
- nodejs
- python3.9
When I tried checking the Python version, it was still Python3.8 and also I could not invoke docker
. When I checked the /var/log/cloud-init.log
, docker has been successfully installed.
Log of less /var/log/cloud-init.log
2021-12-10 06:03:55,535 - subp.py[DEBUG]: Running command ['eatmydata', 'apt-get', '--option=Dpkg::Options::=--force-confold', '--option=Dpkg::options::=--force-unsafe-
io', '--assume-yes', '--quiet', 'install', 'docker'] with allowed return codes [0] (shell=False, capture=False)
2021-12-10 06:03:57,901 - util.py[DEBUG]: apt-install [eatmydata apt-get --option=Dpkg::Options::=--force-confold --option=Dpkg::options::=--force-unsafe-io --assume-ye
s --quiet install docker] took 2.365 seconds
How did you invoke python? Installing python3.9 won't replace the system libraries or python. So python3
will still point to python3.8, but you should be able to invoke python3.9 with python3.9
.
I think you intended to install docker.io
, not docker
. docker
in the repos is a system tray docking application.