Fix Docker installation
What does this MR do?
Fixes Docker installation for Windows 2022
Why was this MR needed?
In newer Windows Server versions, despite that containers support is present, Docker is not being pre-installed.
With the new installation method that we've introduced in !54 (merged), installation is divided in two steps:
- enabling Containers feature (if it's not enabled yet) - this requires machine restart!
- installing Docker on a machine that was rebooted after Containers feature was enabled.
Unfortunately, the installation flow from !54 (merged) doesn't handle this correctly. This is what we're fixing in this MR.
We will explicitly enable Containers feature and reboot the machine before executing the Docker installation script
There are also few other updates that happened to be required:
- script invocation in the chef recipe was quoted in a wrong way which was making it a NOOP
👉 940d9244, - there was a bug in the
install-docker-ce.ps1
script that had to be fixed👉 b0b0ceda, - Docker version specification was wrong (we need explicit number like
20.10.24
and not20.10
)👉 28290f99.
What's the best way to test this MR?
What are the relevant issue numbers?
Related to: Windows 21H2 image building (gitlab-org/gitlab-runner#30941 - closed)