forked from kagisearch/smallweb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
39 lines (30 loc) · 856 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
39
FROM python:3.11-buster
ENV PYTHONUNBUFFERED=True
ENV URL_PREFIX=/smallweb
ENV MNT_DIR /app/data
ENV BUCKET kagi-us-central1-smallweb
ENV PORT 8080
RUN set -e; \
apt-get update -y && apt-get install -y \
libpq-dev \
curl \
gcc \
tini \
lsb-release; \
gcsFuseRepo=gcsfuse-`lsb_release -c -s`; \
echo "deb http://packages.cloud.google.com/apt $gcsFuseRepo main" | \
tee /etc/apt/sources.list.d/gcsfuse.list; \
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | \
apt-key add -; \
apt-get update -y
RUN apt-get install -y gcsfuse
RUN apt-get clean
WORKDIR /app
COPY gcsfuse_run.sh gcsfuse_run.sh
RUN chmod +x gcsfuse_run.sh
COPY app/requirements.txt requirements.txt
RUN pip3 install -r requirements.txt
COPY app/ .
EXPOSE $PORT
ENTRYPOINT ["/usr/bin/tini", "--"]
CMD ["/app/gcsfuse_run.sh"]