File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,6 +7,9 @@ JEKYLL=bundle config set --local path .vendor/bundle && bundle install && bundle
77PARSER =bin/markdown_ast.rb
88DST =_site
99
10+ # Find Docker
11+ DOCKER := $(shell which docker 2>/dev/null)
12+
1013# Check Python 3 is installed and determine if it's called via python3 or python
1114# (https://stackoverflow.com/a/4933395)
1215PYTHON3_EXE := $(shell which python3 2>/dev/null)
@@ -50,14 +53,18 @@ site : lesson-md index.md
5053
5154# # * docker-serve : use Docker to serve the site
5255docker-serve :
53- @docker pull carpentries/lesson-docker:latest
54- @docker run --rm -it \
56+ ifeq (, $(DOCKER ) )
57+ $(error Your system does not appear to have Docker installed)
58+ else
59+ @$(DOCKER) pull carpentries/lesson-docker:latest
60+ @$(DOCKER) run --rm -it \
5561 -v $${PWD}:/home/rstudio \
5662 -p 4000:4000 \
5763 -p 8787:8787 \
5864 -e USERID=$$(id -u) \
5965 -e GROUPID=$$(id -g) \
6066 carpentries/lesson-docker:latest
67+ endif
6168
6269# # * repo-check : check repository settings
6370repo-check : python
You can’t perform that action at this time.
0 commit comments