Distro Detective
Part of the Introduction to Docker section of Coddy's Terminal journey — lesson 38 of 40.
Challenge
MediumCompare two operating systems. Run these commands one after the other:
- In an
alpinecontainer, print thePRETTY_NAMEline of/etc/os-release - In an
ubuntucontainer, print itsPRETTY_NAMEline
Use sh -c with grep PRETTY_NAME /etc/os-release inside each container, and --rm so the containers clean themselves up.
Use -w /etc to set the working directory, then sh -c "grep PRETTY_NAME os-release" inside each container, with --rm so the containers clean themselves up.
Try it yourself
Terminal