Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Docker

You're reading from   Mastering Docker Unlock new opportunities using Docker's most advanced features

Arrow left icon
Product type Paperback
Published in Oct 2018
Publisher
ISBN-13 9781789616606
Length 426 pages
Edition 3rd Edition
Tools
Arrow right icon
Authors (2):
Arrow left icon
Scott Gallagher Scott Gallagher
Author Profile Icon Scott Gallagher
Scott Gallagher
Russ McKendrick Russ McKendrick
Author Profile Icon Russ McKendrick
Russ McKendrick
Arrow right icon
View More author details
Toc

Table of Contents (17) Chapters Close

Preface 1. Docker Overview 2. Building Container Images FREE CHAPTER 3. Storing and Distributing Images 4. Managing Containers 5. Docker Compose 6. Windows Containers 7. Docker Machine 8. Docker Swarm 9. Docker and Kubernetes 10. Running Docker in Public Clouds 11. Portainer - A GUI for Docker 12. Docker Security 13. Docker Workflows 14. Next Steps with Docker 15. Assessments 16. Other Books You May Enjoy

Running Windows containers

As already hinted at by the first part of this chapter, launching and interacting with Windows containers using the Docker command-line client is no different to what we have been running so far. Let's test this by running the hello-world container:

$ docker container run hello-world

Just as before, this will download the hello-world container and return a message:

The only difference on this occasion is that rather than the Linux image, Docker pulled the windows-amd64 version of the image that is based on the nanoserver-sac2016 image.

Now, let's look at running a container in the foreground, this time running PowerShell:

$ docker container run -it microsoft/windowsservercore powershell

Once your shell is active, running the following command will give you the computer name, which is the container ID:

$ Get-CimInstance -ClassName Win32_Desktop...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime