-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
27 lines (21 loc) · 933 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
FROM python:3.11-slim
LABEL org.opencontainers.image.source="https://github.com/F1ashhimself/electricitybot.git" \
org.opencontainers.image.licenses="MIT" \
org.opencontainers.image.title="electricitybot" \
org.opencontainers.image.description="Bot that will send telegram message in case of electricity state was changed"
RUN apt-get update && \
apt-get install -y --no-install-recommends iputils-ping && \
apt-get clean autoclean && \
apt-get autoremove --yes && \
rm -rf /var/lib/{apt,dpkg,cache,log}/ && \
useradd --create-home --no-log-init --shell /bin/bash electricitybot && \
chmod o+rwx /opt
COPY . /opt/
RUN chown -R electricitybot:electricitybot /opt/*
USER electricitybot
WORKDIR /opt
RUN export PATH="${PATH}":~/.local/bin/ && \
python -m pip install --no-cache-dir poetry==1.1.15 && \
poetry install && \
chmod +x entrypoint.sh
ENTRYPOINT ["./entrypoint.sh"]