Created
May 12, 2020 12:27
-
-
Save micahyoung/86631de6137f3731b47465c3ad587d53 to your computer and use it in GitHub Desktop.
Get Docker Daemon Windows Host OS Version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ARG os_tag | |
FROM mcr.microsoft.com/windows/servercore:${os_tag} | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# parses this reponse for "1809": `"KernelVersion": "10.0 17763 (17763.1.amd64fre.rs5_release.180914-1434)"` | |
export os_tag=$(docker system info -f '{{index (split .KernelVersion ".") 5 | printf "%.4s"}}') | |
docker build --tag lifecycle-test --build-arg os_tag |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment