forked from hypothesis/bouncer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
33 lines (24 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
31
32
33
FROM gliderlabs/alpine:3.3
MAINTAINER Hypothes.is Project and contributors
# Install system build and runtime dependencies.
RUN apk add --no-cache ca-certificates python3 nodejs curl \
&& curl -sSL https://bootstrap.pypa.io/get-pip.py | python3 \
&& rm -rf /var/cache/apk/*
# Create the bouncer user, group, home directory and package directory.
RUN addgroup -S bouncer \
&& adduser -S -G bouncer -h /var/lib/bouncer bouncer
WORKDIR /var/lib/bouncer
# Copy packaging
COPY README.rst package.json setup.* ./
RUN npm install --production \
&& npm cache clean
COPY gunicorn.conf.py ./
# Copy the rest of the application files
COPY bouncer ./bouncer/
RUN pip install --no-cache-dir -e .
# Persist the static directory.
VOLUME ["/var/lib/bouncer/bouncer/static"]
# Start the web server by default
EXPOSE 8000
USER bouncer
CMD ["gunicorn", "-b", "0.0.0.0:8000", "bouncer:app()"]