From ec9761a0ec1f9d7c5f71d473cb21d58db183127c Mon Sep 17 00:00:00 2001 From: zsnmwy Date: Sun, 2 Sep 2018 23:59:20 +0800 Subject: [PATCH] Support docker --- Dockerfile | 16 ++++++++++++++++ docker-entrypoint.sh | 3 +++ 2 files changed, 19 insertions(+) create mode 100644 Dockerfile create mode 100644 docker-entrypoint.sh diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..19c2e0a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +FROM python:alpine + +WORKDIR /app + + +RUN apk add --update --no-cache --virtual build_images g++ gcc libxslt-dev git && \ + git clone https://github.com/Foair/course-crawler.git /app && \ + pip install requests BeautifulSoup4 lxml -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com && \ + apk del build_images && \ + rm -rf /app/README.md /app/LICENSE + +COPY ./docker-entrypoint.sh /app + +RUN chmod 777 ./docker-entrypoint.sh + +ENTRYPOINT ["./docker-entrypoint.sh"] diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh new file mode 100644 index 0000000..9151919 --- /dev/null +++ b/docker-entrypoint.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +python mooc.py "$@" -d "/video"