syncserver/Dockerfile

29 lines
751 B
Docker
Raw Normal View History

2018-07-23 04:55:11 +00:00
FROM python:2.7-alpine
2014-04-16 19:43:05 +00:00
RUN addgroup -g 1001 app \
&& adduser -u 1001 -S -D -G app -s /usr/sbin/nologin app
2014-04-16 19:43:05 +00:00
ENV LANG C.UTF-8
WORKDIR /app
# install syncserver dependencies
COPY ./requirements.txt /app/requirements.txt
COPY ./dev-requirements.txt /app/dev-requirements.txt
RUN apk --no-cache update \
&& apk add dumb-init libstdc++ libffi-dev openssl-dev g++ \
&& pip install --upgrade pip \
&& pip install --upgrade --no-cache-dir -r requirements.txt \
&& pip install --upgrade --no-cache-dir -r dev-requirements.txt \
&& apk del g++
2014-04-16 19:43:05 +00:00
2018-07-23 04:55:11 +00:00
COPY . /app
RUN python ./setup.py develop
2014-04-16 19:43:05 +00:00
# run as non priviledged user
USER app
2018-07-23 04:55:11 +00:00
# run the server by default
ENTRYPOINT ["/usr/bin/dumb-init", "/app/docker-entrypoint.sh"]
CMD ["server"]