Skip to content

First Nuclei call breaks when converting to multi-stage build #2

Description

@gsilvapt

Hi there,

Was digging through this repository and noticed this TODO in the Dockerfile:

# TODO: refactor entrypoint to Go, build it statically and just use FROM scratch...

I liked the idea and it was a fun weekend project converting the Python script to Go. Now I am having some troubles updating the Dockerfile to the Go stack to maintain functionality.

I created a multi-stage Dockerfile to first build the project and install Nuclei to then copy the binaries over to a new container FROM scratch. However, we cannot use the RUN directive anymore, since that is plugged in as /bin/sh -c $expression. Skimmed containers like scratch, busybox and even distroless do not have sh or any other shell.

The question is do we need to call RUN nuclei -ut? This seems to only be there for smoke testing, without having really a purpose there. If we have to, then I am not sure how to bypass this "limitation" of these images. If not, the build proceeds and the go binary gets called. I can push my branch if you want to take a look, just let me know.

Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions