-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
65 lines (58 loc) · 1.68 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
60
61
62
63
64
65
# See README for how to use this.
# Based on Dockerfile for layerindex-web
FROM ubuntu:jammy
LABEL maintainer="Rob Woolley <[email protected]>"
ENV PYTHONUNBUFFERED=1 \
LANGUAGE=en_US \
LANG=en_US.UTF-8 \
LC_ALL=en_US.UTF-8 \
LC_CTYPE=en_US.UTF-8
## Uncomment to set proxy ENVVARS within container
#ENV http_proxy http://your.proxy.server:port
#ENV https_proxy https://your.proxy.server:port
#ENV no_proxy localhost,127.0.0.0/8
# NOTE: we don't purge gcc below as we have some places in the OE metadata that look for it
COPY requirements.txt /
RUN DEBIAN_FRONTEND=noninteractive apt-get update \
&& apt-get install -y locales \
&& echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen \
&& locale-gen en_US.UTF-8 \
&& update-locale \
&& apt-get install -y --no-install-recommends \
autoconf \
g++ \
gcc \
make \
python2 \
python3-pip \
python3-mysqldb \
python3-dev \
python3-wheel \
zlib1g-dev \
libfreetype6-dev \
libjpeg-dev \
libmariadb-dev-compat \
netcat-openbsd \
curl \
wget \
git \
vim \
rpm2cpio \
rpm \
cpio \
&& echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen \
&& locale-gen en_US.UTF-8 \
&& update-locale \
&& pip3 install gunicorn \
&& pip3 install setuptools \
&& pip3 install -r /requirements.txt \
&& apt-get purge -y autoconf g++ make python3-dev libjpeg-dev \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean
COPY . /opt/errorreport
COPY docker/migrate.sh /opt/migrate.sh
# Start Gunicorn
WORKDIR /opt/errorreport
RUN /opt/migrate.sh
CMD ["/usr/local/bin/gunicorn", "wsgi:application", "--workers=4", "--bind=:5000", "--timeout=60", "--log-level=debug", "--chdir=/opt/errorreport"]