-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
47 lines (37 loc) · 1.62 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
FROM ubuntu:focal
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install --quiet --yes --no-install-recommends software-properties-common && \
add-apt-repository ppa:malcscott/python-ucam-webauth && \
apt-get update && \
apt-get install --quiet --yes --no-install-recommends python3-flask python3-flask-sqlalchemy python3-ucam-webauth python3-yaml && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# python-srcf dependencies
# (Self-contained stanza to aid in deletion when python-srcf gets PPA-ed)
RUN apt-get update && \
apt-get install --quiet --yes --no-install-recommends python3-six python3-psycopg2 python3-ldap3 python3-pymysql python3-sqlalchemy && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# srcflib dependencies
# (Self-contained stanza to aid in deletion when python-srcf gets PPA-ed)
RUN apt-get update && \
apt-get install --quiet --yes --no-install-recommends python3-requests python3-pylibacl && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# flask_talisman and srcflib and srcf
RUN apt-get update && \
apt-get install --quiet --yes --no-install-recommends python3-pip && \
apt-get install --quiet --yes --no-install-recommends git python3-setuptools && \
pip3 install git+https://github.com/srcf/srcflib && \
pip3 install git+https://github.com/srcf/srcf-python && \
pip3 install flask_talisman && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
COPY pubkey2 /etc/apache2/ucam_webauth_keys/pubkey2
COPY pubkey500 /etc/apache2/ucam_webauth_keys/pubkey500
COPY pubkey501 /etc/apache2/ucam_webauth_keys/pubkey501
WORKDIR /opt/srcf/control
COPY . .
EXPOSE 5000
CMD ["python3", "run.py"]