Skip to Main Content
Windows Server 2019 Automation with PowerShell Cookbook - Third Edition
book

Windows Server 2019 Automation with PowerShell Cookbook - Third Edition

by Thomas Lee
February 2019
Beginner to intermediate content levelBeginner to intermediate
542 pages
10h 34m
English
Packt Publishing
Content preview from Windows Server 2019 Automation with PowerShell Cookbook - Third Edition

Using a Dockerfile to create and use a container

Containers can be used in a variety of ways. In most cases, you are going to want to build your own custom images, complete with an operating system, OS features, and applications. A great way to build your image is to use a Dockerfile containing the instructions for building a new image, and then use the docker build command to create a customized container you can then run.

Getting ready

In this recipe, you use the container host, CH1, that you set up in the Configuring a container host recipe.

How to do it...

  1. Create a folder and Set-Location to the folder on CH1:
    $SitePath = 'C:\RKWebContainer' $NIHT = @{ Path = $SitePath ItemType = 'Directory' ErrorAction = 'SilentlyContinue' } New-Item @NIHT | Out-Null ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Windows Server Automation with PowerShell Cookbook, Fifth Edition - Fifth Edition

Windows Server Automation with PowerShell Cookbook, Fifth Edition - Fifth Edition

Thomas Lee

Publisher Resources

ISBN: 9781789808537OtherErrata PagePurchase Link