-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
50 lines (36 loc) · 1.38 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
FROM debian:9
RUN DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y \
curl \
git \
libboost-python-dev \
libgraphicsmagick++1-dev \
libjpeg62-turbo-dev \
libldap2-dev \
libpq-dev \
libsasl2-dev \
nginx \
postgresql \
postgresql-contrib \
python-dev \
python-pip
# Install S6 to do process management
RUN curl -L https://github.com/just-containers/s6-overlay/releases/download/v1.21.0.2/s6-overlay-amd64.tar.gz | tar xzv -C /
ENTRYPOINT ["/init"]
ADD . /opt/refcollections/archaeology-reference-collections
ADD etc/nginx/refcollections /etc/nginx/sites-enabled/default
ADD etc/services.d/ /etc/services.d/
WORKDIR /opt/refcollections/archaeology-reference-collections
RUN pip install -r /opt/refcollections/archaeology-reference-collections/requirements.txt
RUN groupadd -g 1001 refcollections && \
useradd -d /opt/refcollections/archaeology-reference-collections -s /usr/sbin/nologin -u 1001 -g refcollections refcollections
RUN chown -R refcollections:refcollections /opt/refcollections/archaeology-reference-collections
RUN mkdir -p /var/log/django && \
chown root:refcollections /var/log/django && \
chmod g+w /var/log/django
RUN DEBIAN_FRONTEND=noninteractive && \
echo "en_AU.UTF-8 UTF-8" > /etc/locale.gen && \
locale-gen en_AU.UTF-8 && \
/usr/sbin/update-locale LANG=en_AU.UTF-8
ENV LC_ALL=en_AU.UTF-8