geostat/Dockerfile

31 lines
655 B
Docker
Raw Permalink Normal View History

2019-06-12 22:49:52 +02:00
FROM alpine
LABEL maintainer "Alexey Nizhegolenko <ratibor78@gmail.com>"
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 \
python3 \
2019-06-12 22:49:52 +02:00
bash && \
python3 -m ensurepip && \
2019-06-12 22:49:52 +02:00
rm -r /usr/lib/python*/ensurepip && \
pip3 install --upgrade pip setuptools && \
pip3 install -r /tmp/requirements.txt && \
2019-06-12 22:49:52 +02:00
rm -r /root/.cache
# 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
CMD [ "python3", "./geoparser.py"]