2019-06-12 22:49:52 +02:00
|
|
|
FROM alpine
|
|
|
|
|
|
|
|
LABEL maintainer "Alexey Nizhegolenko <ratibor78@gmail.com>"
|
2021-01-25 17:00:22 +01:00
|
|
|
LABEL description "Geostat application"
|
2019-06-12 22:49:52 +02:00
|
|
|
|
|
|
|
|
|
|
|
# Copy the requirements file
|
|
|
|
COPY requirements.txt /tmp/requirements.txt
|
|
|
|
|
|
|
|
# Install all needed packages
|
|
|
|
RUN apk add --no-cache \
|
2021-01-25 17:00:22 +01:00
|
|
|
python3 \
|
2019-06-12 22:49:52 +02:00
|
|
|
bash && \
|
2021-01-25 17:00:22 +01:00
|
|
|
python3 -m ensurepip && \
|
2019-06-12 22:49:52 +02:00
|
|
|
rm -r /usr/lib/python*/ensurepip && \
|
2021-01-25 17:00:22 +01:00
|
|
|
pip3 install --upgrade pip setuptools && \
|
|
|
|
pip3 install -r /tmp/requirements.txt && \
|
2019-06-12 22:49:52 +02:00
|
|
|
rm -r /root/.cache
|
|
|
|
|
2021-01-25 17:00:22 +01:00
|
|
|
# Copy the Geolite base
|
|
|
|
ADD GeoLite2-City.mmdb /
|
|
|
|
|
|
|
|
#Copy the geohash lib locally
|
|
|
|
ADD geohash /
|
2019-06-12 22:49:52 +02:00
|
|
|
|
|
|
|
# Copy the application file
|
|
|
|
ADD geoparser.py /
|
|
|
|
|
2019-06-12 23:03:43 +02:00
|
|
|
# Run our app
|
2021-01-25 17:00:22 +01:00
|
|
|
CMD [ "python3", "./geoparser.py"]
|