qinling/runtimes/python2/Dockerfile
Lingxian Kong 05588c1957 Add sidecar support for runtime
Split function package download functionality into a separate
container, so that it will be easy to add additional runtime support.

I was planning to use kubernetes new verion apps api in qinling, but
failed because the kubernetes client in global requirement is not
updated yet, so I comment the code out in case we use them in future.

Change-Id: I0709b8ac689638b78e00ca35d0fea2db6cae0d0f
Story: 2001580
Task: 6607
2018-03-06 01:31:16 +00:00

20 lines
828 B
Docker

FROM phusion/baseimage:0.9.22
MAINTAINER anlin.kong@gmail.com
# We need to use non-root user because root user is not affected by ulimit.
USER root
RUN useradd -Ms /bin/bash qinling
RUN apt-get update && \
apt-get -y install python-dev python-setuptools libffi-dev libxslt1-dev libxml2-dev libyaml-dev libssl-dev python-pip && \
pip install -U pip setuptools uwsgi
COPY . /app
WORKDIR /app
RUN pip install --no-cache-dir -r requirements.txt && \
mkdir -p /var/qinling/packages && \
chown -R qinling:qinling /app /var/qinling/packages
# uwsgi --http :9090 --uid qinling --wsgi-file server.py --callable app --master --processes 5 --threads 1
CMD ["/usr/local/bin/uwsgi", "--http", ":9090", "--uid", "qinling", "--wsgi-file", "server.py", "--callable", "app", "--master", "--processes", "5", "--threads", "1"]