Skip to content

Commit 61bb086

Browse files
committed
v5.1.0-5 - a little tighter, more to do to get image smaller, test use cases
1 parent 89b8fba commit 61bb086

File tree

2 files changed

+12
-15
lines changed

2 files changed

+12
-15
lines changed

Dockerfile

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,25 @@
11
FROM debian:bookworm-slim
22

3-
MAINTAINER Tom Mitchell "[email protected]"
3+
LABEL maintainer="Tom Mitchell <[email protected]>"
44
ENV VERSION=5.1.0
55
ENV TAG=v5.1.0
66
ENV WEEWX_ROOT=/home/weewx/weewx-data
7-
ENV WEEWX_VERSION=4.10.0
7+
ENV WEEWX_VERSION=5.1.0
88
ENV HOME=/home/weewx
99
ENV TZ=America/New_York
1010
ENV 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

1414
RUN 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

2621
USER weewx
22+
2723
RUN 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+
5046
COPY conf-fragments/* /home/weewx/tmp/conf-fragments/
5147
RUN 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+
7168
ADD ./bin/run.sh $WEEWX_ROOT/bin/run.sh
72-
CMD $WEEWX_ROOT/bin/run.sh
69+
CMD ["sh", "-c", "$WEEWX_ROOT/bin/run.sh"]
7370
WORKDIR $WEEWX_ROOT

build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/usr/bin/env bash
2-
REV=4
2+
REV=5
33
WEEWX_VERSION=5.1.0
44
IMAGE_VERSION=$WEEWX_VERSION-$REV
55
#docker build --no-cache -t mitct02/weewx:$VERSION .
6-
BUILDKIT_COLORS="run=123,20,245:error=yellow:cancel=blue:warning=white" docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64 -t mitct02/weewx:$IMAGE_VERSION .
6+
BUILDKIT_COLORS="run=123,20,245:error=yellow:cancel=blue:warning=white" docker buildx build --push --platform linux/arm/v7,linux/arm64/v8,linux/amd64 -t mitct02/weewx:$IMAGE_VERSION .
77
#BUILDKIT_COLORS="run=123,20,245:error=yellow:cancel=blue:warning=white" docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64 -t mitct02/weewx:$IMAGE_VERSION .
88
#docker pull mitct02/weewx:$IMAGE_VERSION

0 commit comments

Comments
 (0)