2021-01-24 19:40:00 +01:00
|
|
|
IMAGE taarifa_0.2.0-210124
|
2021-01-24 01:23:17 +01:00
|
|
|
FROM alpine3.12-python3.8_3.8.5-210106
|
|
|
|
|
|
|
|
RUN EOF
|
|
|
|
# Install runtime dependencies
|
|
|
|
apk --no-cache add nginx
|
|
|
|
|
|
|
|
# Install build dependencies
|
|
|
|
apk --no-cache add --virtual .deps git
|
|
|
|
|
|
|
|
# Install Taarifa
|
|
|
|
mkdir /srv/taarifa
|
2021-01-24 19:40:00 +01:00
|
|
|
wget https://github.com/trendspotter/TaarifaWaterpoints/releases/download/0.2/TaarifaWaterpoints-0.2.tar.xz -O - | tar xJf - -C /srv/taarifa
|
2021-01-24 01:23:17 +01:00
|
|
|
pip3 install -r /srv/taarifa/requirements.txt
|
|
|
|
mv src/taarifaapi/taarifa_api /usr/lib/python3.8/site-packages/taarifa_api
|
|
|
|
|
|
|
|
# Create OS user
|
|
|
|
addgroup -S -g 8080 taarifa
|
|
|
|
adduser -S -u 8080 -h /srv/taarifa -s /bin/false -g taarifa -G taarifa taarifa
|
|
|
|
chown -R taarifa:taarifa /srv/taarifa
|
|
|
|
|
|
|
|
# Cleanup
|
|
|
|
apk --no-cache del .deps
|
|
|
|
rm -rf /root/.cache /src
|
|
|
|
EOF
|
|
|
|
|
|
|
|
COPY image.d
|
|
|
|
|
|
|
|
CMD /bin/s6-svscan /etc/services.d
|