/
Dockerfile
89 lines (75 loc) · 1.57 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
##
# BuildGrid's Docker build manifest.
#
# ¡FOR LOCAL DEVELOPMENT ONLY!
#
# Builds an image from local sources.
#
FROM debian:buster
RUN [ \
"apt-get", "update" ]
RUN [ \
"apt-get", "install", "-y", \
"python3", "python3-venv", "python3-pip", \
"bubblewrap", "fuse3" \
]
# Use /app as working directory:
WORKDIR /app
# Create a virtual environment:
RUN [ \
"python3", "-m", "venv", "/app/env" \
]
# Upgrade Python core modules:
RUN [ \
"/app/env/bin/python", "-m", "pip", \
"install", "--upgrade", \
"setuptools", "pip", "wheel" \
]
# Install the main requirements:
ADD requirements.txt /app
RUN [ \
"/app/env/bin/python", "-m", "pip", \
"install", "--requirement", \
"requirements.txt" \
]
# Install the database requirements:
ADD requirements.db.txt /app
RUN [ \
"/app/env/bin/python", "-m", "pip", \
"install", "--requirement", \
"requirements.db.txt" \
]
# Install the auth. requirements:
ADD requirements.auth.txt /app
RUN [ \
"/app/env/bin/python", "-m", "pip", \
"install", "--requirement", \
"requirements.auth.txt" \
]
# Install the test requirements:
ADD requirements.tests.txt /app
RUN [ \
"/app/env/bin/python", "-m", "pip", \
"install", "--requirement", \
"requirements.tests.txt" \
]
# Copy the repo. contents:
COPY . /app
# Add tools directory to the PATH:
ENV PATH=$PATH:/app/tools
# Install BuildGrid:
RUN [ \
"/app/env/bin/python", "-m", "pip", \
"install", "--editable", \
".[auth,tests]" \
]
# Entry-point for the image:
ENTRYPOINT [ \
"/app/env/bin/bgd" \
]
# Default command (default config.):
CMD [ \
"server", "start", \
"data/config/default.conf", \
"-vvv" \
]