-
Notifications
You must be signed in to change notification settings - Fork 12
/
Dockerfile
68 lines (52 loc) · 2.71 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
#*******************************************************************************
#Dockerfile
#*******************************************************************************
#Purpose:
#This file describes the operating system prerequisites for RRR, and is used by
#the Docker software.
#Author:
#Cedric H. David, 2018-2023
#*******************************************************************************
#Usage
#*******************************************************************************
#docker build -t rrr:myimage -f Dockerfile . #Create image
#docker run --rm --name rrr_mycontainer \
# -it rrr:myimage #Run image in container
#docker run --rm --name rrr_mycontainer \
# -v $PWD/input:/home/rrr/input \
# -v $PWD/output:/home/rrr/output \
# -it rrr:myimage #Run and map volumes
#docker save -o rrr_myimage.tar rrr:myimage #Save a copy of image
#docker load -i rrr_myimage.tar #Load a saved image
#*******************************************************************************
#Operating System
#*******************************************************************************
FROM debian:11.7-slim
#*******************************************************************************
#Copy files into Docker image (this ignores the files listed in .dockerignore)
#*******************************************************************************
WORKDIR /home/rrr/
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/pip/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
#*******************************************************************************