Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Bob Tanner
packer-windows
Commits
d026e2ea
Unverified
Commit
d026e2ea
authored
Jan 21, 2017
by
Stefan Scherer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use Start-Job with -ArgumentList
Signed-off-by:
Stefan Scherer
<
scherer_stefan@icloud.com
>
parent
236bd190
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
scripts/docker/docker-pull-async.ps1
scripts/docker/docker-pull-async.ps1
+16
-16
No files found.
scripts/docker/docker-pull-async.ps1
View file @
d026e2ea
function
DockerPull
{
Param
([
string
]
$image
)
Write-Host
Installing
$image
...
$j
=
Start-Job
-ScriptBlock
{
docker
pull
$image
}
while
(
$j
.
JobStateInfo
.
state
-ne
"Completed"
)
{
Write-Host
$j
.
JobStateInfo
.
state
Start-Sleep
10
}
$results
=
Receive-Job
-Job
$j
$results
}
DockerPull
microsoft/windowsservercore
DockerPull
microsoft/nanoserver
function
DockerPull
{
Param
([
string
]
$image
)
Write-Host
Installing
$image
...
$j
=
Start-Job
-ScriptBlock
{
docker
pull
$args
[
0
]
}
-ArgumentList
$image
while
(
$j
.
JobStateInfo
.
state
-ne
"Completed"
)
{
Write-Host
$j
.
JobStateInfo
.
state
Start-Sleep
10
}
$results
=
Receive-Job
-Job
$j
$results
}
DockerPull
microsoft/windowsservercore
DockerPull
microsoft/nanoserver
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment