Skip to content

Commit

Permalink
docker tag number = jupyterlab version number
Browse files Browse the repository at this point in the history
  • Loading branch information
boecklic committed Jul 9, 2019
1 parent 45b9686 commit d0e6397
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
13 changes: 8 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,18 @@ DOCKERHUB_USER = boecklic
PWD := $(shell pwd)
LOCAL_UID := $(shell id -u $$USER)
CMD ?=
# use $$ to escape $: $$0 is reduces to $0 in shell
TAG := $(shell cat requirements.txt | grep -E ^jupyterlab | awk '{split($$0,a,"=="); print a[2]}')

.PHONY: build
build:
$(DOCKER) build -t $(DOCKERHUB_USER)/jupylab\:latest .
@echo $(TAG)
$(DOCKER) build -t $(DOCKERHUB_USER)/jupylab\:$(TAG) .

.PHONY: push
push: build
$(DOCKER) tag $(DOCKERHUB_USER)/jupylab\:latest $(DOCKERHUB_USER)/jupylab\:latest
$(DOCKER) push $(DOCKERHUB_USER)/jupylab\:latest
$(DOCKER) tag $(DOCKERHUB_USER)/jupylab\:$(TAG) $(DOCKERHUB_USER)/jupylab\:$(TAG)
$(DOCKER) push $(DOCKERHUB_USER)/jupylab\:$(TAG)


.PHONY: run
Expand All @@ -25,8 +28,8 @@ run:
# the container
$(DOCKER) run -it --init -p 8888:8888 \
-e LOCAL_UID=$(LOCAL_UID) \
-v $(PWD):/home/user $(DOCKERHUB_USER)/jupylab\:latest $(CMD)
-v $(PWD):/home/user $(DOCKERHUB_USER)/jupylab\:$(TAG) $(CMD)

.PHONY: login
login:
$(DOCKER) exec -it $(DOCKERHUB_USER)/jupylab\:latest /bin/bash
$(DOCKER) exec -it $(DOCKERHUB_USER)/jupylab\:$(TAG) /bin/bash
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ipykernel==5.1.0
#jupyterlab==0.35.6
jupyterlab==1.0.1
jupyterlab==0.35.6
#jupyterlab==1.0.1
# OWSLib requires python-dev
OWSLib==0.17.0
plotly==3.4.2
Expand Down

0 comments on commit d0e6397

Please sign in to comment.