forked from c-h-david/shbaam
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile_slim
66 lines (50 loc) · 2.74 KB
/
Dockerfile_slim
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
55
56
57
58
59
60
61
62
63
64
65
66
#*******************************************************************************
#Dockerfile_slim
#*******************************************************************************
#Purpose:
#This file describes the operating system prerequisites for SHBAAM, and is used
#by the Docker software. Note that this '_slim' version makes for a small image.
#Author:
#Wyte Krongapiradee, and Cedric H. David, 2018-2018
#*******************************************************************************
#Usage
#*******************************************************************************
#docker build -t shbaam:myimage-slim -f Dockerfile_slim .#Create image
#docker run --rm --name shbaam_mycontainer_slim\
# -it shbaam:myimage-slim #Run image in container
#docker run --rm --name shbaam_mycontainer_slim\
# -v $PWD/input:/home/shbaam/input \
# -v $PWD/output:/home/shbaam/output \
# -it shbaam:myimage-slim #Run and map volumes
#docker save -o shbaam_myimage_slim.tar \
# shbaam:myimage-slim #Save a copy of image
#docker load -i shbaam_myimage_slim.tar #Load a saved image
#*******************************************************************************
#Operating System
#*******************************************************************************
FROM debian:stable-slim
#*******************************************************************************
#Copy files into Docker image (this ignores the files listed in .dockerignore)
#*******************************************************************************
COPY . ./shbaam
WORKDIR /shbaam
#*******************************************************************************
#Operating System Requirements
#*******************************************************************************
RUN apt-get update && \
apt-get install -y --no-install-recommends python libspatialindex-c4v5 && \
rm -rf /var/lib/apt/lists/*
#*******************************************************************************
#Python requirements
#*******************************************************************************
ADD https://bootstrap.pypa.io/get-pip.py .
RUN python get-pip.py --no-cache-dir && \
rm get-pip.py
RUN pip install Fiona netCDF4==1.3.1 numpy Rtree Shapely --no-cache-dir
#*******************************************************************************
#Intended (default) command at execution of image (not used during build)
#*******************************************************************************
CMD /bin/bash
#*******************************************************************************
#End
#*******************************************************************************