You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.3 KiB

  1. FROM alpine:3.6
  2. MAINTAINER Dashie "dashie@sigpipe.me"
  3. ARG WEEWX_VERSION=3.7.1
  4. ARG PYTHON_PIP_VERSION=9.0.1
  5. LABEL org.label-schema.license=MIT \
  6. org.label-schema.name=weewx \
  7. org.label-schema.vcs-url=https://dev.sigpipe.me/dashie/docker-things
  8. ADD common.txt /root/
  9. RUN apk add --no-cache --update \
  10. curl freetype libjpeg openssh openssl python2 python2-dev \
  11. py-configobj py-mysqldb rsync rsyslog && \
  12. mkdir build && cd build && \
  13. wget -q -O get-pip.py https://bootstrap.pypa.io/get-pip.py && \
  14. wget -q -O weewx.tar.gz http://www.weewx.com/downloads/released_versions/weewx-$WEEWX_VERSION.tar.gz && \
  15. python get-pip.py --disable-pip-version-check --no-cache-dir \
  16. pip==$PYTHON_PIP_VERSION && \
  17. pip --version && \
  18. apk add --no-cache --virtual .fetch-deps \
  19. gcc git freetype-dev jpeg-dev musl-dev zlib-dev && \
  20. pip install --target /usr/lib/python2.7/site-packages \
  21. -r /root/common.txt && \
  22. tar xf weewx.tar.gz --strip-components=1 && \
  23. ./setup.py build && ./setup.py install --no-prompt && \
  24. find /usr/local -depth \( \
  25. \( -type d -a -name test -o -name tests \) -o \
  26. \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
  27. \) -exec rm -rf '{}' +; \
  28. apk del .fetch-deps; \
  29. rm -rf /var/log/* /var/cache/apk/* /build
  30. VOLUME "/home/weewx"
  31. ADD entrypoint.sh /root/
  32. ENTRYPOINT /root/entrypoint.sh