Mythic icon indicating copy to clipboard operation
Mythic copied to clipboard

feature request: podman and Nix flake support

Open drishal opened this issue 10 months ago • 2 comments

As the title says, is it possible to add support for podman? on the latest mythic-cli with podman it complains that it needs a minimum docker version even though I have latest version of podman installed. Also would it be possible to add support for nix flakes as well?

drishal avatar Apr 04 '24 05:04 drishal

I'm not sure if there's a podman golang library or what nix flakes is, but I recently refactored the mythic-cli to try to support multiple things besides just Docker. I factored everything out to an interface, https://github.com/its-a-feature/Mythic/blob/master/Mythic_CLI/src/cmd/manager/managerInterface.go. All you'd need to do:

  • implement that interface in its own file (like this https://github.com/its-a-feature/Mythic/blob/master/Mythic_CLI/src/cmd/manager/dockerComposeManager.go)
  • add a case for your interface here https://github.com/its-a-feature/Mythic/blob/master/Mythic_CLI/src/cmd/manager/managerInterface.go#L89-L99
  • in your .env file set the global_manager to be your new thing (i.e. sudo ./mythic-cli config set global_manager podman. Now when you run mythic-cli commands, it'll leverage your interface instead of the docker one

its-a-feature avatar Apr 04 '24 16:04 its-a-feature

I'm not sure if there's a podman golang library or what nix flakes is, but I recently refactored the mythic-cli to try to support multiple things besides just Docker. I factored everything out to an interface, https://github.com/its-a-feature/Mythic/blob/master/Mythic_CLI/src/cmd/manager/managerInterface.go. All you'd need to do:

* implement that interface in its own file (like this https://github.com/its-a-feature/Mythic/blob/master/Mythic_CLI/src/cmd/manager/dockerComposeManager.go)

* add a case for your interface here https://github.com/its-a-feature/Mythic/blob/master/Mythic_CLI/src/cmd/manager/managerInterface.go#L89-L99

* in your `.env` file set the `global_manager` to be your new thing (i.e. `sudo ./mythic-cli config set global_manager podman`. Now when you run mythic-cli commands, it'll leverage your interface instead of the docker one

ah thanks a lot for podman will definitely take a look at this, also for now I decided to instead use the nix docker image to be able to use nix to manage my dependencies for now (edit: though if possible please do add a little more out of the box support for podman)

drishal avatar Apr 04 '24 16:04 drishal