-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathDockerfile
More file actions
42 lines (34 loc) · 1.3 KB
/
Copy pathDockerfile
File metadata and controls
42 lines (34 loc) · 1.3 KB
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
FROM alpine:3.20
ARG VERSION AUTHOR TITLE DESCRIPTION LICENSES URL CREATED REVISION
LABEL org.opencontainers.image.version="$VERSION" \
org.opencontainers.image.authors="$AUTHOR" \
org.opencontainers.image.title="$TITLE" \
org.opencontainers.image.description="$DESCRIPTION" \
org.opencontainers.image.licenses="$LICENSES" \
org.opencontainers.image.url="$URL" \
org.opencontainers.image.created="$CREATED" \
org.opencontainers.image.revision="$REVISION"
ENV PATH="/opt/ewsposter/bin:$PATH"
ENV PYTHONWARNINGS="ignore:pkg_resources is deprecated"
RUN apk -U --no-cache add \
python3 \
python3-dev \
py3-virtualenv \
py3-pip \
git && \
git clone https://github.com/telekom-security/ewsposter /opt/ewsposter && \
adduser --disabled-password --shell /bin/ash --uid 2000 ews && \
cd /opt/ewsposter && \
mkdir -p spool log json && \
git checkout master && \
cp /opt/ewsposter/ews.cfg.docker /opt/ewsposter/ews.cfg && \
python3 -m venv /opt/ewsposter && \
source /opt/ewsposter/bin/activate && \
pip install --upgrade pip setuptools wheel && \
pip install -r requirements.txt && \
chown -R ews:ews /opt/ewsposter && \
apk del git
STOPSIGNAL SIGKILL
USER ews:ews
WORKDIR /opt/ewsposter
CMD [ "python3", "ews.py", "-l 1" ]