add script install section back

This commit is contained in:
Tammy Fox 2018-07-02 17:09:04 -04:00 committed by GitHub
parent e74fd60201
commit d7c6f633a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 54 additions and 0 deletions

View File

@ -71,6 +71,60 @@ sconfig
Select option `6) Download and Install Updates`.
## Use a script to install Docker EE
Use the following steps when you want to install manually, script automated
installs, or install on air-gapped systems.
1. In a PowerShell command prompt, download the installer archive on a machine
that has a connection.
```PowerShell
# On an online machine, download the zip file.
invoke-webrequest -UseBasicparsing -Outfile {{ filename }} {{ download_url }}
```
2. Copy the zip file to the machine where you want to install Docker. In a
PowerShell command prompt, use the following commands to extract the archive,
register, and start the Docker service.
```PowerShell
#Stop Docker service
Stop-Service docker
# Extract the archive.
Expand-Archive {{ filename }} -DestinationPath $Env:ProgramFiles -Force
# Clean up the zip file.
Remove-Item -Force {{ filename }}
# Install Docker. This requires rebooting.
$null = Install-WindowsFeature containers
# Add Docker to the path for the current session.
$env:path += ";$env:ProgramFiles\docker"
# Optionally, modify PATH to persist across sessions.
$newPath = "$env:ProgramFiles\docker;" +
[Environment]::GetEnvironmentVariable("PATH",
[EnvironmentVariableTarget]::Machine)
[Environment]::SetEnvironmentVariable("PATH", $newPath,
[EnvironmentVariableTarget]::Machine)
# Register the Docker daemon as a service.
dockerd --register-service
# Start the Docker service.
Start-Service docker
```
3. Test your Docker EE installation by running the `hello-world` container.
```PowerShell
docker container run hello-world:nanoserver
```
## Install a specific version
To install a specific Docker version, you can use the