11FROM debian:bookworm-slim
22
3- MAINTAINER Tom Mitchell
" [email protected] "3+ LABEL maintainer= " Tom Mitchell < [email protected] > "44ENV VERSION=5.1.0
55ENV TAG=v5.1.0
66ENV WEEWX_ROOT=/home/weewx/weewx-data
7- ENV WEEWX_VERSION=4.10 .0
7+ ENV WEEWX_VERSION=5.1 .0
88ENV HOME=/home/weewx
99ENV TZ=America/New_York
1010ENV PATH=/usr/bin:$PATH
1111
1212# && apt-get install curl bash python3 python3-dev python3-pip python3-venv gcc libc-dev libffi-dev tzdata rsync openssh-client openssl git -y
1313
1414RUN apt-get update \
15- && apt-get install wget unzip python3 python3-dev python3-pip python3-venv tzdata rsync openssh-client openssl git libffi-dev python3-setuptools libjpeg-dev -y
16- # RUN python3 -m pip install pip --upgrade \
17- # && python3 -m pip install setuptools \
18- # && python3 -m pip install cryptography \
19- # && python3 -m pip install paho-mqtt
20-
21- RUN addgroup weewx \
15+ && apt-get install wget unzip python3 python3-dev python3-pip python3-venv tzdata rsync openssh-client openssl git libffi-dev python3-setuptools libjpeg-dev -y \
16+ && addgroup weewx \
2217 && useradd -m -g weewx weewx \
2318 && chown -R weewx:weewx /home/weewx \
2419 && chmod -R 755 /home/weewx
2520
2621USER weewx
22+
2723RUN python3 -m venv /home/weewx/weewx-venv \
2824 && chmod -R 755 /home/weewx \
2925 && . /home/weewx/weewx-venv/bin/activate \
@@ -40,13 +36,13 @@ RUN python3 -m venv /home/weewx/weewx-venv \
4036 # If you use MySQL or Maria
4137 && python3 -m pip install PyMySQL \
4238 # If you use sqlite
43- && python3 -m pip install db-sqlite3
44-
45- RUN git clone https://github.com/weewx/weewx ~/weewx \
39+ && python3 -m pip install db-sqlite3 \
40+ && git clone https://github.com/weewx/weewx ~/weewx \
4641 && cd ~/weewx \
4742 && git checkout $TAG \
4843 && . /home/weewx/weewx-venv/bin/activate \
4944 && python3 ~/weewx/src/weectl.py station create --no-prompt
45+
5046COPY conf-fragments/* /home/weewx/tmp/conf-fragments/
5147RUN mkdir -p /home/weewx/tmp \
5248 && cat /home/weewx/tmp/conf-fragments/* >> /home/weewx/weewx-data/weewx.conf
@@ -68,6 +64,7 @@ RUN cd /var/tmp \
6864 && cd /var/tmp \
6965 && rm -rf weewx-mqtt.zip weewx-mqtt-master
7066#
67+
7168ADD ./bin/run.sh $WEEWX_ROOT/bin/run.sh
72- CMD $WEEWX_ROOT/bin/run.sh
69+ CMD [ "sh" , "-c" , " $WEEWX_ROOT/bin/run.sh" ]
7370WORKDIR $WEEWX_ROOT
0 commit comments