-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathDockerfile
34 lines (26 loc) · 1.1 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
#
# Build Stage
#
FROM python:3.8-alpine as build
# Install requirements for building dependencies. This is mainly for compiled
# C code required by some of the Python packages.
RUN apk add --no-cache curl-dev gcc libffi-dev linux-headers musl-dev
WORKDIR /usr/src/paradrop
COPY requirements.txt ./
RUN pip install --no-cache-dir --requirement requirements.txt
COPY . .
RUN pip install /usr/src/paradrop/paradrop/daemon
#
# Run Stage
#
FROM python:3.8-alpine
# Install runtime dependencies. These include commands that Paradrop uses such
# as iptables as well as shared libraries.
RUN apk --no-cache add ca-certificates dnsmasq haproxy hostapd iptables ip6tables libcurl pulseaudio-dev
# Copy all of the Python packages that were installed in the build stage.
COPY --from=build /usr/local/lib/python3.8/site-packages /usr/local/lib/python3.8/site-packages
# Copy the static files for the admin panel because the Python package does not
# install them.
COPY --from=build /usr/src/paradrop/paradrop/localweb/www /usr/local/lib/python3.8/site-packages/paradrop/static
EXPOSE 80
CMD [ "python", "-m", "paradrop.main" ]