-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
56 lines (43 loc) · 1.43 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
47
48
49
50
51
52
53
54
FROM python:3.6-slim-stretch
LABEL maintainer="Simon Kassel <[email protected]>"
ADD requirements.txt /tmp/requirements.txt
RUN apt-get update && \
apt-get install -y \
wget \
build-essential \
make \
gcc \
locales \
libgdal20 libgdal-dev \
python-dev \
protobuf-compiler \
libprotobuf-dev \
libtokyocabinet-dev \
python-psycopg2 \
libspatialindex-dev && \
python -m pip install numpy cython --no-binary numpy,cython && \
python -m pip install \
"rasterio>=1.0a12" fiona shapely rtree \
--pre --no-binary rasterio,fiona,shapely && \
python -m pip install -r /tmp/requirements.txt && \
python -m pip uninstall -y cython && \
rm -r /root/.cache/pip && \
apt-get remove -y --purge libgdal-dev make gcc build-essential && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/*
RUN dpkg-reconfigure locales && \
locale-gen C.UTF-8 && \
/usr/sbin/update-locale LANG=C.UTF-8
ENV LC_ALL C.UTF-8
ENV PYTHONPATH="$PYTHONPATH:/home/user/"
# Open Ports for Jupyter
EXPOSE 8888
RUN useradd -d /home/user -m -s /bin/bash user && echo "user:user" | chpasswd && adduser user sudo
# start working in the "tester" home directory
WORKDIR /home/user
# Make the files owned by tester
RUN chown -R user:user /home/user
# Switch to your new user in the docker image
USER user
# Run a shell script
CMD ["/bin/bash"]