mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-12 12:32:58 +00:00

* letencrypt workflow * Don't mount self-signed secrets directory over runtime dir where nbextensions might be preinstalled from Dockerfile (c) Copyright IBM Corp. 2015
44 lines
1.3 KiB
Makefile
44 lines
1.3 KiB
Makefile
# Copyright (c) Jupyter Development Team.
|
|
# Distributed under the terms of the Modified BSD License.
|
|
|
|
.PHONY: help check image notebook
|
|
|
|
IMAGE:=my-notebook
|
|
|
|
# Common, extensible docker run command
|
|
define RUN_NOTEBOOK
|
|
@docker volume create --name $(WORK_VOLUME) > /dev/null
|
|
-@docker rm -f $(NAME) 2> /dev/null
|
|
@docker run -d -p $(PORT):8888 \
|
|
--name $(NAME) \
|
|
-v $(WORK_VOLUME):/home/jovyan/work \
|
|
$(DOCKER_ARGS) \
|
|
$(IMAGE) bash -c "$(PRE_CMD) chown jovyan /home/jovyan/work && start-notebook.sh $(ARGS)" > /dev/null
|
|
@echo "DONE: Notebook '$(NAME)' listening on $$(docker-machine ip $$(docker-machine active)):$(PORT)"
|
|
endef
|
|
|
|
help:
|
|
@cat README.md
|
|
|
|
check:
|
|
@which docker-machine > /dev/null || (echo "ERROR: docker-machine not found (brew install docker-machine)"; exit 1)
|
|
@which docker > /dev/null || (echo "ERROR: docker not found (brew install docker)"; exit 1)
|
|
@docker | grep volume > /dev/null || (echo "ERROR: docker 1.9.0+ required"; exit 1)
|
|
|
|
image: DOCKER_ARGS?=
|
|
image:
|
|
@docker build --rm $(DOCKER_ARGS) -t $(IMAGE) .
|
|
|
|
notebook: PORT?=80
|
|
notebook: NAME?=notebook
|
|
notebook: WORK_VOLUME?=$(NAME)-data
|
|
notebook: check
|
|
$(RUN_NOTEBOOK)
|
|
|
|
# docker-machine drivers
|
|
include virtualbox.makefile
|
|
include softlayer.makefile
|
|
|
|
# Preset notebook configurations
|
|
include self-signed.makefile
|
|
include letsencrypt.makefile |