-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
44 lines (37 loc) · 1.01 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
FROM alpine:3.12
LABEL Maintainer="Michael Stella <[email protected]>"
ARG PIP_EXTRA_INDEX_URL
ENV PYTHON_EGG_CACHE=/tmp \
PYTHONPATH=/app \
PIP_NO_CACHE_DIR=0 \
PIP_EXTRA_INDEX_URL=$PIP_EXTRA_INDEX_URL \
TZ=UTC
ENTRYPOINT ["tini", "--", "rssalertbot"]
RUN addgroup bot \
&& adduser -D -G bot bot \
&& mkdir /home/bot/.aws \
&& chown -R bot:bot /home/bot
RUN apk add --no-cache \
ca-certificates \
libssl1.1 \
python3 \
py3-multidict \
py3-pip \
py3-setuptools \
py3-yarl \
tini \
tzdata \
yaml \
&& rm -rf /var/cache/apk/* \
&& ln -s /usr/bin/python3 /usr/bin/python
# setup timezone
RUN cp /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ >/etc/timezone && apk del tzdata
# install the application
COPY rssalertbot /app/rssalertbot
COPY CHANGELOG.rst MANIFEST.in setup.py /app/
WORKDIR /app
RUN pip install -U pip
RUN pip install -e '.[dynamo,slack]'
# don't run as root
USER bot
CMD ["-c", "config.yaml"]