-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move dockerfile to top level directory
- Loading branch information
Ben Mather
committed
Jan 10, 2019
1 parent
bab08b3
commit 426c0be
Showing
2 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
FROM alpine:latest | ||
|
||
# Install things | ||
RUN echo "http://mirror.leaseweb.com/alpine/edge/testing" >> /etc/apk/repositories | ||
RUN apk add --update --no-cache \ | ||
gcc \ | ||
g++ \ | ||
gfortran \ | ||
build-base \ | ||
python3-dev \ | ||
py3-pip \ | ||
py3-numpy \ | ||
py3-scipy \ | ||
py3-zmq \ | ||
cmake \ | ||
curl \ | ||
wget \ | ||
libzmq \ | ||
zlib-dev \ | ||
musl-dev \ | ||
freetype-dev \ | ||
libpng-dev \ | ||
libxml2-dev \ | ||
openblas-dev \ | ||
geos-dev \ | ||
proj4-dev | ||
|
||
RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories | ||
RUN apk add --update --no-cache \ | ||
libressl2.7-libcrypto \ | ||
gdal-dev | ||
|
||
|
||
RUN ln -s /usr/include/locale.h /usr/include/xlocale.h | ||
# RUN python3 -m pip install --no-cache-dir --upgrade numpy && \ | ||
RUN python3 -m pip install --no-cache-dir --upgrade pip numpy && \ | ||
python3 -m pip install --no-cache-dir setuptools wheel Cython && \ | ||
python3 -m pip install --no-cache-dir \ | ||
packaging \ | ||
jupyter \ | ||
pyepsg \ | ||
cartopy && \ | ||
python3 -m pip install --no-cache-dir matplotlib | ||
|
||
|
||
# Install Tini.. this is required because CMD (below) doesn't play nice with notebooks for some reason: | ||
# https://github.com/ipython/ipython/issues/7062, https://github.com/jupyter/notebook/issues/334 | ||
RUN curl -L https://github.com/krallin/tini/releases/download/v0.10.0/tini > tini && \ | ||
echo "1361527f39190a7338a0b434bd8c88ff7233ce7b9a4876f3315c22fce7eca1b0 *tini" | sha256sum -c - && \ | ||
mv tini /usr/local/bin/tini && \ | ||
chmod +x /usr/local/bin/tini | ||
|
||
# expose notebook port | ||
EXPOSE 8888 | ||
|
||
|
||
# add a notebook profile | ||
RUN mkdir -p -m 700 /root/.jupyter/ && \ | ||
echo "c.NotebookApp.ip = '0.0.0.0'" >> /root/.jupyter/jupyter_notebook_config.py | ||
|
||
# note we also use xvfb which is required for viz | ||
ENTRYPOINT ["/usr/local/bin/tini", "--"] |