Updating the Dockerfile with the new configuration
This commit is contained in:
parent
0f5df1ccee
commit
9ef949a704
1 changed files with 11 additions and 10 deletions
21
Dockerfile
21
Dockerfile
|
@ -1,7 +1,7 @@
|
|||
FROM alpine
|
||||
|
||||
LABEL maintainer "Alexey Nizhegolenko <ratibor78@gmail.com>"
|
||||
LABEL description "Geostat app"
|
||||
LABEL description "Geostat application"
|
||||
|
||||
|
||||
# Copy the requirements file
|
||||
|
@ -9,21 +9,22 @@ COPY requirements.txt /tmp/requirements.txt
|
|||
|
||||
# Install all needed packages
|
||||
RUN apk add --no-cache \
|
||||
python2 \
|
||||
python3 \
|
||||
bash && \
|
||||
python2 -m ensurepip && \
|
||||
python3 -m ensurepip && \
|
||||
rm -r /usr/lib/python*/ensurepip && \
|
||||
pip2 install --upgrade pip setuptools && \
|
||||
pip2 install -r /tmp/requirements.txt && \
|
||||
pip3 install --upgrade pip setuptools && \
|
||||
pip3 install -r /tmp/requirements.txt && \
|
||||
rm -r /root/.cache
|
||||
|
||||
# Download Geolite base
|
||||
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
|
||||
# Copy the Geolite base
|
||||
ADD GeoLite2-City.mmdb /
|
||||
|
||||
#Copy the geohash lib locally
|
||||
ADD geohash /
|
||||
|
||||
# Copy the application file
|
||||
ADD geoparser.py /
|
||||
|
||||
# Run our app
|
||||
CMD [ "python", "./geoparser.py"]
|
||||
CMD [ "python3", "./geoparser.py"]
|
||||
|
|
Loading…
Reference in a new issue