-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathDockerfile
70 lines (54 loc) · 2.89 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#*******************************************************************************
#Dockerfile
#*******************************************************************************
#Purpose:
#This file describes the operating system prerequisites for SHBAAM, and is used
#by the Docker software.
#Author:
#Cedric H. David, 2018-2020
#*******************************************************************************
#Usage
#*******************************************************************************
#docker build -t shbaam:myimage -f Dockerfile . #Create image
#docker run --rm --name shbaam_mycontainer \
# -it shbaam:myimage #Run image in container
#docker run --rm --name shbaam_mycontainer \
# -v $PWD/input:/home/shbaam/input \
# -v $PWD/output:/home/shbaam/output \
# -it shbaam:myimage #Run and map volumes
#docker save -o shbaam_myimage.tar shbaam:myimage #Save a copy of image
#docker load -i shbaam_myimage.tar #Load a saved image
#docker commit containerID shbaam:myimage2 #Save image from contID
#docker start -a -i containerID #Restart a container
#*******************************************************************************
#Operating System
#*******************************************************************************
FROM debian:stretch-slim
#*******************************************************************************
#Copy files into Docker image (this ignores the files listed in .dockerignore)
#*******************************************************************************
WORKDIR /home/shbaam/
COPY . .
#*******************************************************************************
#Operating System Requirements
#*******************************************************************************
RUN apt-get update && \
apt-get install -y --no-install-recommends $(grep -v -E '(^#|^$)' requirements.apt) && \
rm -rf /var/lib/apt/lists/*
#*******************************************************************************
#Python requirements
#*******************************************************************************
ADD https://bootstrap.pypa.io/get-pip.py .
RUN python3 get-pip.py --no-cache-dir \
`grep 'pip==' requirements.pip` \
`grep 'setuptools==' requirements.pip` \
`grep 'wheel==' requirements.pip` && \
rm get-pip.py
RUN pip3 install --no-cache-dir -r requirements.pip
#*******************************************************************************
#Intended (default) command at execution of image (not used during build)
#*******************************************************************************
CMD /bin/bash
#*******************************************************************************
#End
#*******************************************************************************