Remove PS> prompts from Windows snippets (#5538)

This commit is contained in:
Jim Galasyn 2017-12-15 15:49:27 -08:00 committed by Misty Stanley-Jones
parent 91022d9e1b
commit 3ef9318fa1
5 changed files with 23 additions and 24 deletions

View File

@ -46,8 +46,8 @@ from all of the manager nodes.
On Windows worker nodes, run the following command to generate a local support dump:
```ps
PS> docker container run --name windowssupport -v 'C:\ProgramData\docker\daemoncerts:C:\ProgramData\docker\daemoncerts' -v 'C:\Windows\system32\winevt\logs:C:\eventlogs:ro' {{ page.ucp_org }}/ucp-dsinfo-win:{{ page.ucp_version }}; docker cp windowssupport:'C:\dsinfo' .; docker rm -f windowssupport
```powershell
docker container run --name windowssupport -v 'C:\ProgramData\docker\daemoncerts:C:\ProgramData\docker\daemoncerts' -v 'C:\Windows\system32\winevt\logs:C:\eventlogs:ro' {{ page.ucp_org }}/ucp-dsinfo-win:{{ page.ucp_version }}; docker cp windowssupport:'C:\dsinfo' .; docker rm -f windowssupport
```
This command creates a directory named `dsinfo` in your current directory.

View File

@ -42,7 +42,7 @@ $ docker stack deploy -c test.yml smokestack
```
{% elsif include.version=="docker-cli-win" %}
```powershell
PS> docker stack deploy -c test.yml smokestack
docker stack deploy -c test.yml smokestack
```
{% elsif include.version=="kubectl" %}
```bash

View File

@ -86,7 +86,7 @@ installs, or install on air-gapped systems.
```PowerShell
# On an online machine, download the zip file.
PS> invoke-webrequest -UseBasicparsing -Outfile {{ filename }} {{ download_url }}
invoke-webrequest -UseBasicparsing -Outfile {{ filename }} {{ download_url }}
```
2. Copy the zip file to the machine where you want to install Docker. In a
@ -95,36 +95,36 @@ installs, or install on air-gapped systems.
```PowerShell
# Extract the archive.
PS> Expand-Archive {{ filename }} -DestinationPath $Env:ProgramFiles
Expand-Archive {{ filename }} -DestinationPath $Env:ProgramFiles
# Clean up the zip file.
PS> Remove-Item -Force {{ filename }}
Remove-Item -Force {{ filename }}
# Install Docker. This will require rebooting.
$null = Install-WindowsFeature containers
# Add Docker to the path for the current session.
PS> $env:path += ";$env:ProgramFiles\docker"
$env:path += ";$env:ProgramFiles\docker"
# Optionally, modify PATH to persist across sessions.
PS> $newPath = "$env:ProgramFiles\docker;" +
$newPath = "$env:ProgramFiles\docker;" +
[Environment]::GetEnvironmentVariable("PATH",
[EnvironmentVariableTarget]::Machine)
PS> [Environment]::SetEnvironmentVariable("PATH", $newPath,
[Environment]::SetEnvironmentVariable("PATH", $newPath,
[EnvironmentVariableTarget]::Machine)
# Register the Docker daemon as a service.
PS> dockerd --register-service
dockerd --register-service
# Start the Docker service.
PS> Start-Service docker
Start-Service docker
```
3. Test your Docker EE installation by running the `hello-world` container.
```PowerShell
PS> docker container run hello-world:nanoserver
docker container run hello-world:nanoserver
```
## Install a specific version

View File

@ -213,19 +213,19 @@ This example assumes that you have PowerShell installed.
2. If you have not already done so, initialize or join the swarm.
```powershell
PS> docker swarm init
docker swarm init
```
3. Save the `index.html` file as a swarm config named `homepage`.
```powershell
PS> docker config create homepage index.html
docker config create homepage index.html
```
4. Create an IIS service and grant it access to the `homepage` config.
```powershell
PS> docker service create
docker service create
--name my-iis
--publish published=8000,target=8000
--config src=homepage,target="\inetpub\wwwroot\index.html"
@ -238,9 +238,9 @@ This example assumes that you have PowerShell installed.
6. Remove the service and the config.
```powershell
PS> docker service rm my-iis
docker service rm my-iis
PS> docker config rm homepage
docker config rm homepage
```
### Advanced example: Use configs with a Nginx service

View File

@ -291,19 +291,19 @@ This example assumes that you have PowerShell installed.
2. If you have not already done so, initialize or join the swarm.
```powershell
PS> docker swarm init
docker swarm init
```
3. Save the `index.html` file as a swarm secret named `homepage`.
```powershell
PS> docker secret create homepage index.html
docker secret create homepage index.html
```
4. Create an IIS service and grant it access to the `homepage` secret.
```powershell
PS> docker service create
docker service create
--name my-iis
--publish published=8000,target=8000
--secret src=homepage,target="\inetpub\wwwroot\index.html"
@ -320,10 +320,9 @@ This example assumes that you have PowerShell installed.
6. Remove the service and the secret.
```powershell
PS> docker service rm my-iis
PS> docker secret rm homepage
PS> docker image remove secret-test
docker service rm my-iis
docker secret rm homepage
docker image remove secret-test
```
### Intermediate example: Use secrets with a Nginx service