rasti.hil@hilandco.com +41 79 367-9677

Search This Blog

Docker shell2http nslookup


Dockerfile

FROM shell2http:bind-tools
RUN apk --no-cache add bind-tools


docker-compose.yml

version: '2'
services:
  nslookup_api:
    image: shell2http:bind-tools
    ports:
      - "8090:8080"
    restart: unless-stopped
    command:  [ "-form", "/nslookup", "nslookup -q=A $$v_host | tail -2 | head -1 | awk '{print $$2\" \" $$3\" \" $$4}'" ]


Test
 curl localhost:8090/nslookup?host=blog.hilandco.com