shellharden icon indicating copy to clipboard operation
shellharden copied to clipboard

(feat) dockerize shellharden

Open vladdoster opened this issue 3 years ago • 2 comments

Enables a user to run shellharden in a Docker container.

  • Add Dockerfile & entrypoint
  • Update README.md
    • Add Docker usage
    • Wrap lines to make it easier to read from CLI
    • Correct misc. grammar & punctuation

I did this so I can use it in a CI/CD pipeline, but thought it might be worth contributing back. If you want, I can publish it to docker hub before you accept this PR.

Thanks for such a great tool!

Signed-off-by: Vladislav Doster [email protected]

vladdoster avatar Apr 11 '21 18:04 vladdoster

@anordal Could I get a review, please?

vladdoster avatar Apr 14 '21 23:04 vladdoster

Ok, I've tried this out, and the default image is good.

But this is a bit niche. Can we have this in a "docker" subdirectory, with a separate readme?

Note that I used to have a docker recipe (7bedf288), but removed it because I thought precompiled binaries would solve some of the need (df5ff65).

The other changes to the readme are also fine, but I would appreciate a separate commit.

But what's the use case for the alpine based image? The logic about maybe executing something if it exists in $PATH does not aspire to safe programming. As for the details, it seems to be missing a chmod +x /init and the default command is wrong.

anordal avatar Apr 15 '21 22:04 anordal