geostat/Dockerfile

30 lines
789 B
Docker
Raw Normal View History

2019-06-12 22:49:52 +02:00
FROM alpine
LABEL maintainer "Alexey Nizhegolenko <ratibor78@gmail.com>"
LABEL description "Geostat app"
# Copy the requirements file
COPY requirements.txt /tmp/requirements.txt
# Install all needed packages
RUN apk add --no-cache \
python2 \
bash && \
python2 -m ensurepip && \
rm -r /usr/lib/python*/ensurepip && \
pip2 install --upgrade pip setuptools && \
pip2 install -r /tmp/requirements.txt && \
rm -r /root/.cache
2019-06-12 23:03:43 +02:00
# Download Geolite base
2019-06-12 22:58:18 +02:00
RUN wget https://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz && \
mkdir tmpgeo && tar -xvf GeoLite2-City.tar.gz -C ./tmpgeo && \
cp /tmpgeo/*/GeoLite2-City.mmdb / && rm -rf ./tmpgeo
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
2019-06-12 22:49:52 +02:00
CMD [ "python", "./geoparser.py"]