-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
30 lines (22 loc) · 890 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
FROM python:3.11.10-alpine3.19
LABEL maintainer="Hypothes.is Project and contributors"
# Install nginx & supervisor
RUN apk add --no-cache nginx gettext supervisor libpq
# Create the hypothesis user, group, home directory and package directory.
RUN addgroup -S hypothesis && adduser -S -G hypothesis -h /var/lib/hypothesis hypothesis
WORKDIR /var/lib/hypothesis
# Copy minimal data to allow installation of python dependencies.
COPY requirements/requirements.txt ./
# Install build deps, build, and then clean up.
RUN apk add --no-cache --virtual \
build-deps \
build-base \
postgresql-dev \
libffi-dev \
&& pip install --no-cache-dir -U pip \
&& pip install --no-cache-dir -r requirements.txt \
&& apk del build-deps
COPY . .
ENV PYTHONPATH /var/lib/hypothesis:$PYTHONPATH
USER hypothesis
CMD /usr/bin/supervisord -c /var/lib/hypothesis/conf/supervisord.conf