Dockerfile 638 B

12345678910111213141516171819202122232425
  1. # not using python:3.*-alpine cause glib-dev package depends python3
  2. # https://pkgs.alpinelinux.org/package/v3.11/main/aarch64/glib-dev
  3. FROM alpine:3.11
  4. RUN apk add --no-cache \
  5. gcc \
  6. glib-dev \
  7. make \
  8. musl-dev \
  9. tini
  10. RUN pip3 install pipenv
  11. ARG SOURCE_DIR_PATH=/switchbot-mqtt
  12. ARG SWITCHBOT_MQTT_VERSION=
  13. COPY . $SOURCE_DIR_PATH
  14. WORKDIR $SOURCE_DIR_PATH
  15. ENV PIPENV_VENV_IN_PROJECT=yeah
  16. RUN SETUPTOOLS_SCM_PRETEND_VERSION=$SWITCHBOT_MQTT_VERSION pipenv install --deploy --verbose
  17. ENV PATH=$SOURCE_DIR_PATH/.venv/bin:$PATH
  18. ENTRYPOINT ["tini", "--"]
  19. CMD ["switchbot-mqtt"]
  20. #RUN apk add bluez-deprecated `# hcitool`