forked from ubccr/coldfront
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
49 lines (33 loc) · 1.65 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
# syntax=docker/dockerfile:experimental
# to build for a development environment, run the following command:
# docker build --build-arg build_env=dev -t coldfront --ssh default . --network=host
FROM python:3.10
ARG build_env=production
ENV BUILD_ENV=$build_env
LABEL org.opencontainers.image.source=https://github.com/fasrc/coldfront
LABEL org.opencontainers.image.description="fasrc coldfront application"
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
&& apt-get install -y redis redis-server \
&& apt-get install -y libsasl2-dev libldap2-dev libssl-dev \
&& apt-get install -y sssd sssd-tools supervisor \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir ~/.ssh && echo "Host git*\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
WORKDIR /usr/src/app
COPY requirements.txt ./
ARG IPYTHON_STARTUP=/root/.ipython/profile_default/startup
RUN mkdir -p ${IPYTHON_STARTUP}
COPY etc/ipython_init.py ${IPYTHON_STARTUP}
RUN pip install --upgrade pip && \
pip install -r requirements.txt
COPY . .
RUN if [ "${BUILD_ENV}" = "dev" ]; then pip install django-redis django-debug-toolbar; fi
RUN pip install django-prometheus gunicorn
ENV PYTHONPATH /usr/src/app:/usr/src/app/ifxreport:/usr/src/app/ifxbilling:/usr/src/app/fiine.client:/usr/src/app/ifxurls:/usr/src/app/nanites.client:/usr/src/app/ifxuser:/usr/src/app/ifxmail.client:/usr/src/app/ifxec
RUN mkdir -p /usr/src/app/media/reports
RUN printf "deb http://ftp.us.debian.org/debian buster main" > /etc/apt/sources.list.d/backports.list && \
apt-get update && apt-get install libreadline7 && \
rm -rf /var/lib/apt/lists/*
EXPOSE 80
EXPOSE 25
CMD ["/bin/bash", "./container_startup.sh"]