diff --git a/README.md b/README.md index 1013074..d8c4158 100644 --- a/README.md +++ b/README.md @@ -154,6 +154,7 @@ A collection of delicious docker recipes. ## Utility - [x] registry-cli +- [x] tldextract ## Media diff --git a/tldextract/Dockerfile b/tldextract/Dockerfile new file mode 100644 index 0000000..ec39ed8 --- /dev/null +++ b/tldextract/Dockerfile @@ -0,0 +1,12 @@ +# +# Dockerfile for tldextract +# + +FROM alpine:3 + +RUN apk add --no-cache py3-tldextract \ + && tldextract --update \ + && tldextract --version + +ENTRYPOINT ["/usr/bin/tldextract"] +CMD ["--help"] diff --git a/tldextract/README.md b/tldextract/README.md new file mode 100644 index 0000000..9e0244d --- /dev/null +++ b/tldextract/README.md @@ -0,0 +1,17 @@ +tldextract +========== + +[tldextract][1] accurately separates a URL's subdomain, domain, and public +suffix, using the Public Suffix List (PSL). + +## Tutorial + +```bash +# Create an alias +$ alias tldextract='docker run --rm -u $(id -u):$(id -g) vimagick/tldextract' + +# Run it +$ tldextract -j www.google.com +``` + +[1]: https://github.com/john-kurkowski/tldextract