ArmyCyberInstitute / cmgr

CTF Challenge Manager
Apache License 2.0
17 stars 9 forks source link

One time running containers #43

Open boomcan90 opened 2 years ago

boomcan90 commented 2 years ago

I'm working on optimizing some of the challenges that I'm writing. The challenges so far need 3 docker containers to be spun up before the builder container can be ran. Any clean ways to do that in cmgr?

Reason that I am doing it this way is that the builder needs to interact with the services that are being spun up. One alternative would be to spin up another container. When I spin up a separate container, it goes into a constant restart-cycle once the script finishes running, which I believe should be due to https://github.com/ArmyCyberInstitute/cmgr/blob/b37c5bfad3a8fcfeef32e94b92d804f29a6d08a8/cmgr/docker.go#L673

I'm currently using cmgr v 0.13.1

jrolli commented 2 years ago

At the moment, I don't think there is a good way to do this. Do you mind sharing more about the kind of challenge you are trying to create to help me understand the specifics (email in my profile is valid if you'd prefer it not to be a public discussion)?

I do have some examples of how to "fake" network captures if that is part of the reason for spinning up multiple containers. If that is along the lines of what you're trying to do, I'll try to merge one of them into this repo in the near future.

boomcan90 commented 2 years ago

I have sent you an email!