-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
41 lines (31 loc) · 1.3 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
FROM debian:buster-slim
RUN apt-get update && apt-get install -y --no-install-recommends apt-utils
# Locales
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y locales
RUN sed -i -e 's/# en_GB.UTF-8 UTF-8/en_GB.UTF-8 UTF-8/' /etc/locale.gen && \
echo 'LANG="en_GB.UTF-8"'>/etc/default/locale && \
dpkg-reconfigure --frontend=noninteractive locales && \
update-locale LANG=en_GB.UTF-8
ENV LANG en_GB.UTF-8
# System
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -qy supervisor build-essential git curl libpq-dev libjpeg-dev zlib1g-dev imagemagick
# Python
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -qy python3-pip python3-dev && pip3 install pipenv
# Node
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash
RUN DEBIAN_FRONTEND=noninteractive apt-get install -qy nodejs
RUN npm install -g npm
# Application
ENV XSACDB_ENVIRONMENT PRODUCTION
ENV XSACDB_CONTAINER DOCKER
# Environment installation, only invalidated when we upgrade third-party packages
COPY Pipfile Pipfile.lock package.json package-lock.json /app/
COPY bin/install-pre.sh /app/bin/
RUN /app/bin/install-pre.sh
ARG VCS_REV="UNKNOWN"
ENV VCS_REV=$VCS_REV
# Add the actuall app code in
COPY . /app
RUN /app/bin/install-post.sh
EXPOSE 5000
CMD /usr/bin/supervisord -c /app/supervisord.conf