syncserver/Dockerfile
dev-rke e4d1758dd4
migrated Dockerfile to be based on alpine linux
The migration also solves an issue when running this service under ARM based architectures, as the previous usage of dumb-init_1.2.0_amd64 is incompatible on ARM architecture.
2018-04-10 01:30:38 +02:00

28 lines
698 B
Docker

FROM python:2.7-alpine3.7
RUN addgroup -g 1001 app \
&& adduser -u 1001 -S -D -G app -s /usr/sbin/nologin app
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 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++
COPY ./syncserver /app/syncserver
COPY ./setup.py /app
RUN python ./setup.py develop
# run as non priviledged user
USER app
ENTRYPOINT ["/usr/bin/dumb-init", "--"]