Skip to content

Instantly share code, notes, and snippets.

@armindocachada
Last active August 15, 2020 09:12
Show Gist options
  • Save armindocachada/519233597c14938ce1152f6a0d378da0 to your computer and use it in GitHub Desktop.
Save armindocachada/519233597c14938ce1152f6a0d378da0 to your computer and use it in GitHub Desktop.
Docker files for Yeelight weather
version: "3.7"
services:
yeelightweather:
container_name: yeelightweather
build:
context: .
dockerfile: Dockerfile
network_mode: host
restart: always
FROM python:rc-slim-buster
RUN TZ=Europe/London && ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get -y update && apt-get -y install cron
RUN pip3 install yeelight
COPY files/* /home/
#RUN chmod 755 /script.sh /entry.sh
RUN /usr/bin/crontab /home/crontab.txt
# Run the command on container startup
RUN touch /var/log/cron.log
CMD cron && tail -f /var/log/cron.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment