Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a tiny alpine based notebook #356

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions tiniest-notebook/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM alpine:3.5

# We install py-zmq from alpine, since installing it from pip requires we have
# gcc and build tools installed. manylinux1 wheels don't work on / for alpine yet
RUN apk add --no-cache python3 py-zmq

RUN pip3 install --no-cache-dir notebook ipykernel jupyterhub

CMD ["/usr/bin/jupyter", "notebook", "--ip=0.0.0.0", "--port=8888"]

EXPOSE 8888
26 changes: 26 additions & 0 deletions tiniest-notebook/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Tiniest notebook stack #

This is the tiniest possible docker image that can run a Jupyter Notebook. It
is primarily meant for demo purposes where speed of pulling is important.

Not recommended for non-demo uses!

## What it gives you

It is based on [Alpine Linux](https://alpinelinux.org/). It uses pip to install
both the notebook and jupyterhub packages - the latter allows us to use this
image for single-user servers in Kubernetes / Docker spawners.

You can use pip3 to install packages (with `pip3` or `apk`) as root. There
are no non-root users provisioned.

## Basic usage

You can run a notebook with:

```
sudo docker run -it --rm -p 8888:8888 jupyter/tiniest-notebook
```

The default command is `/usr/bin/jupyter` (not `/usr/local/bin/jupyth`). For
use with jupyterhub, `/usr/bin/jupyterhub-singleuser` is also available.