iptoasn-webservice/docker
Frank Denis 85deb50eab Don't use a very old alpine linux version 2021-01-03 09:55:38 +01:00
..
Dockerfile Don't use a very old alpine linux version 2021-01-03 09:55:38 +01:00
README.md nits 2018-07-18 19:14:05 +02:00
iptoasn-entrypoint.sh Add entrypoint shell script 2017-07-31 20:44:50 +03:00

README.md

How to use

Assume you are in the repo's root folder:

docker build -t iptoasn -f docker/Dockerfile .
docker run -itd \
           --name my-iptoasn \
           -p 80:53661 \
           iptoasn

Wait while iptoasn is downloading data, and then you can do curl requests as you used to:

curl 127.0.0.1:80/v1/as/ip/8.8.8.8

Setting service parameters

Listen port and database URL can be specified by environment variables:

docker run -itd \
           --name my-iptoasn \
           -e IPTOASN_PORT=10000 \
           -e IPTOASN_DBURL='http://your-database-url.com' \
           -p 80:10000 \
           iptoasn

Use as a binary

docker run -it --rm iptoasn --help