-
Notifications
You must be signed in to change notification settings - Fork 22
/
Dockerfile
38 lines (31 loc) · 899 Bytes
/
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
FROM tiangolo/uwsgi-nginx-flask:python3.8
# Remove sample application included in the base image.
RUN rm /app/main.py /app/uwsgi.ini
# Install packages
# TODO: install zstd
RUN apt-get update \
&& apt-get install -y \
binutils \
cpio \
cron \
file \
jq \
rpm2cpio \
wget \
zstd \
&& rm -rf /var/lib/apt/lists/*
# Install cron job
COPY crontab /etc/cron.d/libc-update
RUN chmod 0644 /etc/cron.d/libc-update \
&& touch /var/log/libcdb.log
# Register cron to supervisor
COPY cron.conf /etc/supervisor/conf.d/cron.conf
# Copy application
COPY app /app
COPY libc-database /libc-database
# Generate autocomplete symbols list
RUN /app/gen_names.sh
# nginx.conf of the base image aliases /static to /app/static.
RUN ln -s /app/search/static /app/static
# Enable download link
COPY nginx.conf /etc/nginx/conf.d/download.conf