Permalink
Browse files

Working automated Docker container

  • Loading branch information...
minimaxir committed Sep 29, 2017
1 parent 3124086 commit f355d5e80503c67c6e1a0e5fd1b744faf3cf8223
Showing with 25 additions and 0 deletions.
  1. +3 −0 .dockerignore
  2. +22 −0 Dockerfile
View
@@ -0,0 +1,3 @@
*
!*.py
!cards.csv
View
@@ -0,0 +1,22 @@
FROM phusion/baseimage:0.9.22
# Use baseimage-docker's init system.
CMD ["/sbin/my_init"]
# https://stackoverflow.com/a/44958097
# Create the log file to be able to run tail
RUN apt-get -y update && apt-get -y install python3-dev python3-pip libav-tools imagemagick libopencv-dev python-opencv
RUN pip3 install --upgrade pip
RUN pip3 --no-cache-dir install imageio numpy scipy matplotlib sympy nose decorator tqdm pillow pytest twython moviepy
RUN python3 -c "import imageio; imageio.plugins.ffmpeg.download()"
COPY . /
# Setup cron job
RUN (crontab -l; echo "* * * * * ls; cd / && python3 /mtgifening.py >> /dev/pts/0 2>&1") | crontab
# Clean up APT when done.
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ENTRYPOINT /sbin/my_init

0 comments on commit f355d5e

Please sign in to comment.