29 lines
557 B
Docker
29 lines
557 B
Docker
# Dependencies
|
|
FROM python:alpine
|
|
RUN pip install -U \
|
|
git \
|
|
pip \
|
|
setuptools \
|
|
wheel
|
|
RUN apk add gcc musl-dev
|
|
|
|
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 setup.py setup.py
|
|
ADD README.md README.md
|
|
ADD personal_data personal_data
|
|
|
|
RUN pip install --no-cache-dir . --break-system-packages
|
|
|
|
USER personal_data
|
|
|
|
# Tracability
|
|
ARG GIT_HASH
|
|
ENV GIT_HASH=${GIT_HASH:-dev}
|
|
|
|
CMD python -m personal_data
|