29 lines
628 B
Docker
29 lines
628 B
Docker
# Dependencies
|
|
FROM python:alpine
|
|
RUN pip install -U \
|
|
pip \
|
|
setuptools \
|
|
wheel
|
|
|
|
WORKDIR /personal_data
|
|
|
|
RUN adduser -S personal_data && chown personal_data /personal_data
|
|
#debian: RUN useradd -m -r personal_data && chown personal_data /personal_data
|
|
|
|
# Requirements
|
|
ADD requirements.txt requirements.txt
|
|
ADD private_deps private_deps
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
RUN pip install --no-cache-dir --no-index --find-links=private_deps private_deps/*
|
|
|
|
# Tracability
|
|
ARG GIT_HASH
|
|
ENV GIT_HASH=${GIT_HASH:-dev}
|
|
|
|
# Code
|
|
ADD personal_data personal_data
|
|
|
|
USER personal_data
|
|
|
|
CMD python -m personal_data
|