Giter Site home page Giter Site logo

Add Dockerfile about shuffledns HOT 5 CLOSED

projectdiscovery avatar projectdiscovery commented on June 5, 2024
Add Dockerfile

from shuffledns.

Comments (5)

ehsandeep avatar ehsandeep commented on June 5, 2024

Hey @Techbrunch,

Thanks, surely we can add Docker support as we have with all other projects, also I believe we need to add massdns installation in this which is required to run shuffledns.

from shuffledns.

Techbrunch avatar Techbrunch commented on June 5, 2024

You are right, I removed too much from my own Dockerfile:

FROM golang:1.14-alpine as build
RUN apk --no-cache add git
RUN go get -u -v github.com/projectdiscovery/shuffledns/cmd/shuffledns; exit 0
ENV GO111MODULE on
WORKDIR github.com/projectdiscovery/shuffledns/cmd/shuffledns
RUN go install ./...

FROM alpine:latest
RUN apk --update --no-cache add ldns \
  && apk --no-cache --virtual .deps add ldns-dev \
                                        git \
                                        build-base \
  && git clone --branch=master \
               --depth=1 \
               https://github.com/blechschmidt/massdns.git \
  && cd massdns \
  && make \
  && mv bin/massdns /bin/massdns \
  && rm -rf /massdns \
  && apk del .deps

COPY --from=build /go/bin/shuffledns /usr/bin/shuffledns
ENV HOME /
ENTRYPOINT ["/usr/bin/shuffledns"]

The massdns part is from: https://github.com/security-dockerfiles/massdns/blob/master/Dockerfile

The image is 13.9MB

from shuffledns.

ehsandeep avatar ehsandeep commented on June 5, 2024
FROM golang:1.14-alpine as build
RUN apk --no-cache add git
RUN go get -u -v github.com/projectdiscovery/shuffledns/cmd/shuffledns; exit 0
ENV GO111MODULE on

#WORKDIR github.com/projectdiscovery/shuffledns/cmd/shuffledns
#RUN go install ./...

FROM alpine:latest
RUN apk --update --no-cache add ldns \
  && apk --no-cache --virtual .deps add ldns-dev \
                                        git \
                                        build-base \
  && git clone --branch=master \
               --depth=1 \
               https://github.com/blechschmidt/massdns.git \
  && cd massdns \
  && make \
  && mv bin/massdns /bin/massdns \
  && rm -rf /massdns \
  && apk del .deps

COPY --from=build /go/bin/shuffledns /usr/bin/shuffledns
ENV HOME /
ENTRYPOINT ["/usr/bin/shuffledns"]
root@b0x:~/test# docker run -v $HOME:/usr/bin -it projectdiscovery/shuffledns -d facebook.com -r resolvers.txt -w test.txt 
docker: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \"/usr/bin/shuffledns\": permission denied": unknown.
ERRO[0001] error waiting for container: context canceled 

@Techbrunch you got it working on your side?

from shuffledns.

Techbrunch avatar Techbrunch commented on June 5, 2024

I think the issue was that I put the massdns binary in a non standard location /bin/massdns here is an updated version with the binary moved to /usr/bin/massdns same as shuffledns:

FROM golang:1.14-alpine as build
RUN apk --no-cache add git
RUN go get -u -v github.com/projectdiscovery/shuffledns/cmd/shuffledns; exit 0
ENV GO111MODULE on
WORKDIR github.com/projectdiscovery/shuffledns/cmd/shuffledns
RUN go install ./...

FROM alpine:latest
LABEL maintainer "Ilya Glotov <[email protected]"

RUN apk --update --no-cache add ldns \
  && apk --no-cache --virtual .deps add ldns-dev \
                                        git \
                                        build-base \
  && git clone --branch=master \
               --depth=1 \
               https://github.com/blechschmidt/massdns.git \
  && cd massdns \
  && make \
  && mv bin/massdns /usr/bin/massdns \
  && rm -rf /massdns \
  && apk del .deps

COPY --from=build /go/bin/shuffledns /usr/bin/shuffledns
ENV HOME /
ENTRYPOINT ["/usr/bin/shuffledns"]

Let me know if it fixes the issue.

from shuffledns.

ehsandeep avatar ehsandeep commented on June 5, 2024

Hi @Techbrunch,

Thank you for the update, I've added the Dockerfile and pushed the image on docker hub as well.

docker pull projectdiscovery/shuffledns:latest

Can you please update the readme section about using the docker to run shuffledns?

from shuffledns.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.