Browse Source

yolo?

master
Dashie der otter 3 years ago
commit
3b3026dc91
Signed by: dashie <rhaamo@leloop.org> GPG Key ID: C2D57B325840B755
3 changed files with 52 additions and 0 deletions
  1. +38
    -0
      Dockerfile
  2. +5
    -0
      common.txt
  3. +9
    -0
      entrypoint.sh

+ 38
- 0
Dockerfile View File

@@ -0,0 +1,38 @@
FROM alpine:3.6

MAINTAINER Dashie "dashie@sigpipe.me"

ARG WEEWX_VERSION=3.7.1
ARG PYTHON_PIP_VERSION=3.0.1

LABEL org.label-schema.license=MIT \
org.label-schema.name=weewx \
org.label-schema.vcs-url=https://dev.sigpipe.me/dashie/docker-things

ADD common.txt /root/

RUN apk add --no-cache --update \
curl freetype libjpeg openssh openssl python2 python2-dev \
py-configobj py-mysqldb rsync rsyslog && \
mkdir build && cd build && \
wget -q -O get-pip.py https://bootstrap.pypa.io/get-pip.py && \
wget -q -O weewx.tar.gz http://www.weewx.com/downloads/released_versions/weewx-$WEEWX_VERSION.tar.gz && \
python get-pip.py --disable-pip-version-check --no-cache-dir \
pip==$PYTHON_PIP_VERSION && \
pip --version && \
apk add --no-cache --virtual .fetch-deps \
gcc git freetype-dev jpeg-dev musl-dev zlib-dev && \
pip install --target /usr/lib/python2.7/site-packages \
-r /root/common.txt && \
tar xf weewx.tar.gz --strip-components=1 && \
./setup.py build && ./setup.py install --no-prompt && \
find /usr/local -depth \( \
\( -type d -a -name test -o -name tests \) -o \
\( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
\) -exec rm -rf '{}' +; \
apk del .fetch-deps; \
rm -rf /var/log/* /var/cache/apk/* /build

ADD entrypoint.sh /root/
ENTRYPOINT /root/entrypoint.sh


+ 5
- 0
common.txt View File

@@ -0,0 +1,5 @@
Cheetah==2.4.4
pillow==4.1.1
pyserial==3.3
PyUSB==1.0.0
six==1.10.0

+ 9
- 0
entrypoint.sh View File

@@ -0,0 +1,9 @@
HOMEDIR=/home/weewx
PATH=$HOMEDIR/bin:$PATH

rsyslogd

weewxd $HOMEDIR/weewx.conf | grep -v LOOP:
# Failure: attempt restart only every 2 minutes
sleep 120
exit 1

Loading…
Cancel
Save