From a6752811a23545d2b21eb3b858632306731bd4a3 Mon Sep 17 00:00:00 2001 From: tatar Date: Tue, 12 Mar 2024 18:22:31 +0300 Subject: [PATCH] add Dockerfile & update README.md for docker image setup --- Dockerfile | 9 +++++++++ README.md | 5 +++++ 2 files changed, 14 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d4fd7c9 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM python:alpine + +COPY . /app + +WORKDIR /app + +RUN pip3 install -r requirements.txt --user + +ENTRYPOINT [ "python3", "ipgeolocation.py" ] diff --git a/README.md b/README.md index 03c7c65..0c9efc9 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,11 @@ if pip3 is missing: * easy_install3 pip * pip3 install -r requirements.txt +Docker Image Setup +=== +* docker build -t IP2geolocation . +* docker run IP2geolocation +* an exapmle; docker run IP2geolocation -m Features ====