-
-
Notifications
You must be signed in to change notification settings - Fork 100
/
Dockerfile
63 lines (53 loc) · 3.84 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
FROM alpine:3.15 AS builder
RUN apk add --no-cache \
autoconf \
automake \
bash \
build-base \
py3-pip \
py3-wheel \
python3-dev
COPY easywall /src/easywall/easywall
COPY requirements.txt /src/easywall/
COPY setup.cfg /src/easywall/
COPY setup.py /src/easywall/
WORKDIR /src/easywall
RUN pip3 install . -t /app
ARG BOOTSTRAP="4.1.3"
ARG JQUERY="3.3.1"
ARG POPPER="1.14.3"
COPY easywall/web/static /app/easywall/web/static
RUN mkdir -p /app/easywall/web/static/css/ && wget -P /app/easywall/web/static/css/ \
https://stackpath.bootstrapcdn.com/bootstrap/$BOOTSTRAP/css/bootstrap.min.css \
https://stackpath.bootstrapcdn.com/bootstrap/$BOOTSTRAP/css/bootstrap.min.css.map
RUN mkdir -p /app/easywall/web/static/js/ && wget -P /app/easywall/web/static/js/ \
https://stackpath.bootstrapcdn.com/bootstrap/$BOOTSTRAP/js/bootstrap.min.js \
https://stackpath.bootstrapcdn.com/bootstrap/$BOOTSTRAP/js/bootstrap.min.js.map \
https://cdnjs.cloudflare.com/ajax/libs/popper.js/$POPPER/umd/popper.min.js \
https://cdnjs.cloudflare.com/ajax/libs/popper.js/$POPPER/umd/popper.min.js.map \
https://code.jquery.com/jquery-$JQUERY.slim.min.js
COPY easywall/web/templates /app/easywall/web/templates
ARG FONTAWESOME="4.7.0"
RUN wget -P /tmp https://fontawesome.com/v$FONTAWESOME/assets/font-awesome-$FONTAWESOME.zip \
&& unzip -d /tmp -q /tmp/font-awesome-$FONTAWESOME.zip \
&& mkdir -p /app/easywall/web/static/css/ && cp -r /tmp/font-awesome-$FONTAWESOME/css/* /app/easywall/web/static/css/ \
&& mkdir -p /app/easywall/web/static/fonts && cp -r /tmp/font-awesome-$FONTAWESOME/fonts/* /app/easywall/web/static/fonts/
FROM alpine:3.15
RUN apk add --no-cache \
bash \
iptables \
ip6tables \
openssl \
uwsgi-python3
COPY --from=builder /app /app
COPY config/*.sample.ini /usr/share/easywall/config/
RUN printf "%s = %s\n" "uid" "easywall" "gid" "easywall" >> /usr/share/easywall/config/web.sample.ini
COPY .version /app/
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
RUN addgroup -S -g 777 easywall && adduser --system --uid 777 -h /app -s /bin/bash -G easywall easywall
VOLUME /app/ssl
VOLUME /app/config
# VOLUME /app/rules
WORKDIR /app
ENTRYPOINT /entrypoint.sh