An Engineers Notebook

Installing the Containers feature | Server 2016

Installing the containers feature can be done via the GUI, however as it’s not becoming a world of PowerShell here are the required commands.

# install docker provider
Install-Module -Name DockerMsftProvider -Repository PSGallery -Force
# install docker
Install-Package -Name docker -ProviderName DockerMsftProvider -Force
# reboot
Restart-Computer -Force
# docker install & root dir
Get-ChildItem -Name 'C:Program FilesDocker'
Get-ChildItem -Name 'C:ProgramDatadocker'
# docker daemon
Get-Service -Name docker
# docker client
docker version
docker info
# configure docker daemon
$json = '{ "graph": "c:\docker" }'
$json | Set-Content c:programdatadockerconfigdaemon.json
New-Item -ItemType Directory -Path c:docker
# restart service
Restart-Service -Name docker

To install a containers feature on a Nano Server:

# install docker provider
Install-Module -Name DockerMsftProvider -Repository PSGallery -Force
# install docker
Install-Package -Name docker -ProviderName DockerMsftProvider -Force
# install the hyper-v role
Install-NanoServerPackage -Name Microsoft-NanoServer-Compute-Package
# reboot
Restart-Computer -Force
# docker install & root dir
Get-ChildItem -Name 'C:Program FilesDocker'
Get-ChildItem -Name 'C:ProgramDatadocker'
# docker daemon
Set-Service -Name docker -StartupType Automatic
Get-Service -Name docker | Start-Service
# docker client
docker version
docker info
# configure docker daemon
$json = '{ "graph": "c:\docker" }'
$json | Set-Content c:programdatadockerconfigdaemon.json
New-Item -ItemType Directory -Path c:docker
# restart service
Restart-Service -Name docker

 

Leave a Reply

Your email address will not be published.