-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathDockerfile
46 lines (34 loc) · 1.33 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Base image of the IPython/Jupyter notebook, with conda
# Intended to be used in a tmpnb installation
# Customized from https://github.com/jupyter/docker-demo-images/tree/master/common
FROM debian:jessie
MAINTAINER Andrew Osheroff <[email protected]>
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update -y &&\
apt-get install --fix-missing -y curl git vim wget build-essential python-dev bzip2 libsm6\
locales nodejs-legacy npm python-virtualenv python-pip gcc gfortran libglib2.0-0 python-qt4 &&\
apt-get clean &&\
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*tmp
# set utf8 locale:
RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && locale-gen
ENV LANG=en_US.UTF-8 \
LC_ALL=en_US.UTF-8
# We run our docker images with a non-root user as a security precaution.
# main is our user
RUN useradd -m -s /bin/bash main
EXPOSE 8888
USER main
ENV HOME /home/main
ENV SHELL /bin/bash
ENV USER main
WORKDIR $HOME
# Add helper scripts
ADD start-notebook.sh /home/main/
USER main
# Install Anaconda and Jupyter
RUN wget https://3230d63b5fc54e62148e-c95ac804525aac4b6dba79b00b39d1d3.ssl.cf1.rackcdn.com/Anaconda2-4.0.0-Linux-x86_64.sh &&\
bash Anaconda2-4.0.0-Linux-x86_64.sh -b &&\
rm Anaconda2-4.0.0-Linux-x86_64.sh
ENV PATH $HOME/anaconda2/bin:$PATH
RUN /home/main/anaconda2/bin/pip install --upgrade pip
ENV SHELL /bin/bash