File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed 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
7
7
PARSER =bin/markdown_ast.rb
8
8
DST =_site
9
9
10
+ # Find Docker
11
+ DOCKER := $(shell which docker 2>/dev/null)
12
+
10
13
# Check Python 3 is installed and determine if it's called via python3 or python
11
14
# (https://stackoverflow.com/a/4933395)
12
15
PYTHON3_EXE := $(shell which python3 2>/dev/null)
@@ -50,14 +53,18 @@ site : lesson-md index.md
50
53
51
54
# # * docker-serve : use Docker to serve the site
52
55
docker-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 \
55
61
-v $${PWD}:/home/rstudio \
56
62
-p 4000:4000 \
57
63
-p 8787:8787 \
58
64
-e USERID=$$(id -u) \
59
65
-e GROUPID=$$(id -g) \
60
66
carpentries/lesson-docker:latest
67
+ endif
61
68
62
69
# # * repo-check : check repository settings
63
70
repo-check : python
You can’t perform that action at this time.
0 commit comments