Skip to content

Commit 04fccfa

Browse files
committed
Updated PowerShell scripts to support latest docker changes
1 parent bd24ad1 commit 04fccfa

2 files changed

Lines changed: 9 additions & 8 deletions

File tree

Docker.BuildAndRun.ps1

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
# Build the image (called blog, version 'latest')
2-
docker build . -t blog:latest
1+
# Run an instance of the container in the background
2+
docker-compose up -d
33

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

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

1011
# Attach to the running container (for debug purposes)
11-
docker attach $container
12+
docker attach $container

Docker.StopAndRemove.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$containers = docker ps -a -q -f ancestor=blog:latest;
1+
$containers = docker ps -a -q -f ancestor=jekyll/jekyll:pages
22

33
Write-Host ''
44

0 commit comments

Comments
 (0)