From 29bfc5385eb3365419f31b9ac67dcb1e64f1483f Mon Sep 17 00:00:00 2001 From: Shuai Lin Date: Sat, 12 Nov 2016 15:50:20 +0800 Subject: [PATCH] Install latest version of pypi. --- image/base/Dockerfile | 30 ++++++++++++++++++++---------- image/base/requirements.in | 11 +++++++++++ image/base/requirements.txt | 17 +++++++++++++++++ image/seafile/Dockerfile | 2 -- launcher | 2 +- 5 files changed, 49 insertions(+), 13 deletions(-) create mode 100644 image/base/requirements.in create mode 100644 image/base/requirements.txt diff --git a/image/base/Dockerfile b/image/base/Dockerfile index 7d6846e..ec4efc7 100644 --- a/image/base/Dockerfile +++ b/image/base/Dockerfile @@ -3,19 +3,29 @@ FROM phusion/baseimage:0.9.19 ENV UPDATED_AT 20161110 -RUN apt-get update -qq && apt-get -qq -y install python2.7-dev memcached python-pip \ - python-setuptools python-imaging python-mysqldb python-memcache python-ldap \ - python-urllib3 sqlite3 nginx \ - vim htop net-tools psmisc git wget curl && \ - pip install -U wheel && pip install click termcolor prettytable colorlog +RUN apt-get update -qq && apt-get -qq -y install memcached sqlite3 nginx \ + python2.7-dev python-imaging python-ldap python-mysqldb + +# Utility tools +RUN apt-get install -qq -y vim htop net-tools psmisc git wget curl + +# Install latest version of pip & wheel +RUN curl -sSL -o /tmp/get-pip.py https://bootstrap.pypa.io/get-pip.py && \ + python /tmp/get-pip.py && \ + rm -rf /tmp/get-pip.py && \ + pip install -U wheel + +ADD requirements.txt /tmp/requirements.txt +RUN pip install -r /tmp/requirements.txt COPY services /services RUN mkdir -p /etc/service/memcached && \ - mv /services/memcached.sh /etc/service/memcached/run && \ - mkdir -p /etc/service/nginx && \ - rm -f /etc/nginx/sites-enabled/* /etc/nginx/conf.d/* && \ - mv /services/nginx.conf /etc/nginx/nginx.conf && \ - mv /services/nginx.sh /etc/service/nginx/run + mv /services/memcached.sh /etc/service/memcached/run + +RUN mkdir -p /etc/service/nginx && \ + rm -f /etc/nginx/sites-enabled/* /etc/nginx/conf.d/* && \ + mv /services/nginx.conf /etc/nginx/nginx.conf && \ + mv /services/nginx.sh /etc/service/nginx/run CMD ["/sbin/my_init", "--", "bash", "-l"] diff --git a/image/base/requirements.in b/image/base/requirements.in new file mode 100644 index 0000000..acb8891 --- /dev/null +++ b/image/base/requirements.in @@ -0,0 +1,11 @@ +# -*- mode: conf -*- + +# Required by seafile/seahub +python-memcached==1.58 +urllib3==1.19 + +# Utility libraries +click==6.6 +termcolor==1.1.0 +prettytable==0.7.2 +colorlog==2.7.0 diff --git a/image/base/requirements.txt b/image/base/requirements.txt new file mode 100644 index 0000000..72595ac --- /dev/null +++ b/image/base/requirements.txt @@ -0,0 +1,17 @@ +# +# This file is autogenerated by pip-compile +# To update, run: +# +# pip-compile --output-file requirements.txt requirements.in +# +click==6.6 +colorlog==2.7.0 +prettytable==0.7.2 +python-memcached==1.58 +six==1.10.0 # via python-memcached +termcolor==1.1.0 +urllib3==1.19 + +# The following packages are commented out because they are +# considered to be unsafe in a requirements file: +# setuptools # via python-ldap diff --git a/image/seafile/Dockerfile b/image/seafile/Dockerfile index e8d0cfc..71e3271 100644 --- a/image/seafile/Dockerfile +++ b/image/seafile/Dockerfile @@ -12,5 +12,3 @@ RUN mkdir -p /etc/my_init.d ADD create_data_links.sh /etc/my_init.d/create_data_links.sh ADD seafile.nginx.conf /etc/nginx/sites-enabled/seafile.nginx.conf - -CMD ["/sbin/my_init", "--", "bash", "-l"] diff --git a/launcher b/launcher index ea0983a..389aadc 100755 --- a/launcher +++ b/launcher @@ -65,7 +65,7 @@ bootstrap() { start() { set_volumes - docker run --rm -it --name seafile $volumes $image # /scripts/start.py + docker run --rm -it --name seafile $volumes $image /scripts/start.py } enter() {