Giter Site home page Giter Site logo

Docker about gobuster HOT 7 CLOSED

oj avatar oj commented on August 16, 2024
Docker

from gobuster.

Comments (7)

0xdevalias avatar 0xdevalias commented on August 16, 2024 2

Probably use FROM golang, maybe from alpine. And then I was thinking it might make sense to use the new multi-build stages coming in 17.0.5 to separate the compile/run steps, and end up with just the compiled binary:

Something akin to:

So maybe something like (untested)..

FROM golang:alpine

COPY . /gobuster
WORKDIR /gobuster

RUN go build main.go

FROM scratch

COPY --from=0 /gobuster/gobuster /gobuster

CMD ["gobuster"]

That said, the onbuild version works as an ok one liner at the moment too:

FROM golang:onbuild

from gobuster.

0xdevalias avatar 0xdevalias commented on August 16, 2024 1

Decided to hack this together today (finally). Multi-stage build, staticly linked, stripped, packed, FROM scratch:

Leaves us with a ~1.35mb docker container:

Can run like:

docker run --rm -v "/Users/foo/sec/seclists:/seclists" devalias/gobuster -w /seclists/Discovery/Web_Content/common.txt -u http://example.com/

DockerHub isn't yet running the latest docker, so multi stage automated builds are broken for now, but that should be updated within the month. For now just manually built/pushed:

Currently sitting on a branch on my fork. Was thinking of figuring out how I could have it build both alpine and scratch images automagically, and wait for automated build to land on dockerhub, though can send a PR if desired:

from gobuster.

OJ avatar OJ commented on August 16, 2024 1

Thanks mate this looks great! I'll dive into it a bit more later on. Thanks for the effort 👍

from gobuster.

OJ avatar OJ commented on August 16, 2024

I'd be open to it, depending on the container and what it intends to do. I know a few people have their own implementations of it as well, so perhaps you'll get some commentary from them along the way.

from gobuster.

0xdevalias avatar 0xdevalias commented on August 16, 2024

Sounds good :)

from gobuster.

0xdevalias avatar 0xdevalias commented on August 16, 2024

So I think i've decided that maintaining the dockerfile separate to the main repo will end up a better experience for updates/etc.

Created https://github.com/0xdevalias/docker-gobuster with my latest iterations. At some point will work it a bit better to provide tagged versions rather than just 'latest' (once I figure how that works)

Would be happy to have it linked up as a 'semi-official' type docker image if you'd be keen.

from gobuster.

firefart avatar firefart commented on August 16, 2024

a dockerfile was already added to the repo

from gobuster.

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.