-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-amd64
51 lines (42 loc) · 1.31 KB
/
Dockerfile-amd64
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
FROM amd64/alpine:3.17
WORKDIR /
# set variables and locales
ENV \
LANG="C.UTF-8"
# Add tagged repos as well as the edge repo so that we can selectively install edge packages
RUN echo "@main http://dl-cdn.alpinelinux.org/alpine/v3.17/main" >> /etc/apk/repositories && \
echo "@community http://dl-cdn.alpinelinux.org/alpine/v3.17/community" >> /etc/apk/repositories && \
echo "@edge http://dl-cdn.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories
# install packages
RUN apk add --no-cache \
ca-certificates \
curl \
git \
python3 \
py3-pip \
py3-mysqlclient
ENV PYTHONPATH /usr/lib/python3/dist-packages
#RUN ln -sf python3 /usr/bin/python
RUN python3 -m ensurepip --upgrade
RUN pip3 install --no-cache --upgrade pip setuptools
RUN pip3 install --no-cache --upgrade \
wheel==0.38.4 \
python-can==4.1.0 \
influxdb==5.3.1 \
serial==0.0.97 \
pyserial \
paho-mqtt==1.6.1 \
pika==1.3.1 \
requests==2.28.1 \
urllib3==1.26.13
# install pyHPSU
RUN cd /opt \
&& git clone https://github.com/N3rdix/pyHPSUmqtt.git pyHPSU\
&& cd /opt/pyHPSU \
&& chmod +x install.sh \
&& sh install.sh
# expose volume
VOLUME /etc/pyHPSU
COPY entrypoint.sh /
RUN chmod +x entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]