-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
59 lines (47 loc) · 1.32 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
FROM python:3.9.6
WORKDIR /open-oni
RUN adduser app && \
mkdir -p /open-oni && \
chown -R app /open-oni
RUN apt-get update && apt-get install -y --no-install-recommends \
krb5-multidev \
libapr1 \
libgssapi-krb5-2 \
libgssrpc4 \
libk5crypto3 \
libkadm5clnt-mit12 \
libkadm5srv-mit12 \
libkdb5-10 \
libkrb5-3 \
libkrb5-dev \
libkrb5support0 \
libmariadb-dev-compat \
libmariadb-dev \
libmariadb3 \
libpq-dev \
libpq5 \
libssl-dev \
libssl1.1 \
linux-libc-dev \
mariadb-common \
openssl && \
rm -rf /var/lib/apt/lists/*
COPY bin/startup /usr/local/bin/startup
COPY bin/migrate /usr/local/bin/migrate
RUN chmod +x /usr/local/bin/startup
RUN chmod +x /usr/local/bin/migrate
USER app
ENV PATH=$PATH:/home/app/.local/bin
# Open-Oni Requirements
COPY open-oni/requirements.lock /open-oni
RUN pip install --no-cache-dir -r requirements.lock --user
# Our requirements on top of Open-Oni
COPY psu-requirements.txt /open-oni
RUN pip install --no-cache-dir -r psu-requirements.txt --user
COPY --chown=app open-oni /open-oni
COPY --chown=app config/settings_local.py /open-oni/onisite
COPY --chown=app config/urls.py /open-oni/onisite
COPY --chown=app themes /open-oni/themes
ADD --chown=app psu-custom/ /open-oni
RUN ["python", "manage.py", "collectstatic", "--noinput"]
CMD ["/usr/local/bin/startup"]