Skip to content

Commit

Permalink
Updated PowerShell scripts to support latest docker changes
Browse files Browse the repository at this point in the history
  • Loading branch information
PHeonix25 committed Jan 2, 2019
1 parent bd24ad1 commit 04fccfa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
15 changes: 8 additions & 7 deletions Docker.BuildAndRun.ps1
@@ -1,11 +1,12 @@
# Build the image (called blog, version 'latest')
docker build . -t blog:latest
# Run an instance of the container in the background
docker-compose up -d

# Run an instance of the image in the background, opening port 4000 as well
$container = docker run -d -p 4000:4000 -t blog:latest
# Get the ID of the container so that we can attach to it
$container = docker-compose ps -q jekyll

# Launch the browser so that we can check our work
start 'http://localhost:4000/'
# Launch the browser so that we can check our work
# NOTE: it might not be ready yet, but at least the tab will be open...
Start-Process 'http://localhost:4000/'

# Attach to the running container (for debug purposes)
docker attach $container
docker attach $container
2 changes: 1 addition & 1 deletion Docker.StopAndRemove.ps1
@@ -1,4 +1,4 @@
$containers = docker ps -a -q -f ancestor=blog:latest;
$containers = docker ps -a -q -f ancestor=jekyll/jekyll:pages

Write-Host ''

Expand Down

0 comments on commit 04fccfa

Please sign in to comment.