2017-09-18 17:07:05 -04:00
|
|
|
FROM alpine:3.5
|
|
|
|
MAINTAINER dwhitena
|
2016-01-24 15:10:38 -06:00
|
|
|
|
2017-09-18 17:07:05 -04:00
|
|
|
# Add gophernotes
|
|
|
|
ADD . /go/src/github.com/gopherdata/gophernotes/
|
2016-01-24 15:10:38 -06:00
|
|
|
|
2017-09-18 17:07:05 -04:00
|
|
|
# Install Jupyter and gophernotes.
|
|
|
|
RUN set -x \
|
|
|
|
# install python and dependencies
|
|
|
|
&& apk update \
|
2018-07-09 12:58:20 -04:00
|
|
|
&& apk --no-cache \
|
|
|
|
--repository http://dl-4.alpinelinux.org/alpine/v3.7/community \
|
|
|
|
--repository http://dl-4.alpinelinux.org/alpine/v3.7/main \
|
|
|
|
--arch=x86_64 add \
|
2017-09-18 17:07:05 -04:00
|
|
|
ca-certificates \
|
|
|
|
python3 \
|
|
|
|
su-exec \
|
|
|
|
gcc \
|
|
|
|
git \
|
|
|
|
py3-zmq \
|
2018-07-09 12:58:20 -04:00
|
|
|
pkgconfig \
|
2017-09-18 17:07:05 -04:00
|
|
|
zeromq-dev \
|
|
|
|
musl-dev \
|
2018-07-09 12:58:20 -04:00
|
|
|
&& pip3 install --upgrade pip==9.0.3 \
|
2017-09-18 17:07:05 -04:00
|
|
|
&& ln -s /usr/bin/python3.5 /usr/bin/python \
|
|
|
|
## install Go
|
|
|
|
&& apk --update-cache --allow-untrusted \
|
|
|
|
--repository http://dl-4.alpinelinux.org/alpine/edge/community \
|
|
|
|
--arch=x86_64 add \
|
|
|
|
go \
|
2018-07-09 12:58:20 -04:00
|
|
|
## jupyter notebook
|
2017-09-18 17:07:05 -04:00
|
|
|
&& ln -s /usr/include/locale.h /usr/include/xlocale.h \
|
2018-07-09 12:58:20 -04:00
|
|
|
### fix pyzmq to v16.0.2 as that is what is distributed with py3-zmq
|
|
|
|
&& pip3 install jupyter notebook pyzmq==16.0.2 \
|
2017-09-18 17:07:05 -04:00
|
|
|
## install gophernotes
|
|
|
|
&& GOPATH=/go go install github.com/gopherdata/gophernotes \
|
|
|
|
&& cp /go/bin/gophernotes /usr/local/bin/ \
|
|
|
|
&& mkdir -p ~/.local/share/jupyter/kernels/gophernotes \
|
|
|
|
&& cp -r /go/src/github.com/gopherdata/gophernotes/kernel/* ~/.local/share/jupyter/kernels/gophernotes \
|
|
|
|
## clean
|
|
|
|
&& find /usr/lib/python3.5 -name __pycache__ | xargs rm -r \
|
|
|
|
&& rm -rf \
|
|
|
|
/root/.[acpw]* \
|
|
|
|
ipaexg00301* \
|
|
|
|
&& rm -rf /var/cache/apk/*
|
2016-09-19 08:27:47 -04:00
|
|
|
|
2017-10-20 17:13:33 -04:00
|
|
|
# Set GOPATH.
|
|
|
|
ENV GOPATH /go
|
|
|
|
|
2016-01-24 15:10:38 -06:00
|
|
|
EXPOSE 8888
|
2018-07-09 12:58:20 -04:00
|
|
|
CMD [ "jupyter", "notebook", "--no-browser", "--allow-root", "--ip=0.0.0.0" ]
|