Skip to content

Commit f2c87f6

Browse files
committed
Setup initial docker for jupyter
0 parents commit f2c87f6

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

build-and-run

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#! /bin/bash
2+
3+
docker build -t typescript-npm docker
4+
5+
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
6+
NOTEBOOKS=$DIR/notebooks
7+
8+
docker run -it \
9+
--mount type=bind,source=${NOTEBOOKS},target=/home/jupyter/notebooks \
10+
-p 8888:8888 \
11+
typescript-npm \
12+
bash -c "jupyter lab --ip=0.0.0.0 --no-browser"

docker/Dockerfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM ubuntu:18.04
2+
3+
RUN apt-get update
4+
RUN apt-get -y install python3 python3-pip
5+
RUN pip3 install jupyterlab
6+
7+
RUN useradd jupyter
8+
RUN mkdir ~jupyter
9+
RUN chown jupyter:jupyter ~jupyter
10+
11+
12+
USER jupyter
13+
RUN mkdir ~jupyter/notebooks
14+
WORKDIR /home/jupyter/notebooks

0 commit comments

Comments
 (0)