diff --git a/ctfcli/spec/challenge-example.yml b/ctfcli/spec/challenge-example.yml index 62a92f7..aa1fd29 100644 --- a/ctfcli/spec/challenge-example.yml +++ b/ctfcli/spec/challenge-example.yml @@ -39,6 +39,9 @@ host: null # Optional settings +# Specify command-line arguments for deploying the challenge. Currently supports SSH deployments, ie `docker run [deploy_args]` +deploy_args: null + # connection_info is used to provide a link, hostname, or instructions on how to connect to a challenge connection_info: nc hostname 12345 diff --git a/ctfcli/utils/deploy.py b/ctfcli/utils/deploy.py index 087874c..93033c7 100644 --- a/ctfcli/utils/deploy.py +++ b/ctfcli/utils/deploy.py @@ -53,7 +53,7 @@ def ssh(challenge, host, protocol): [ "ssh", host.netloc, - f"docker run -d -p{exposed_port}:{exposed_port} --name {image_name} --restart always {image_name}", + f"docker run -d -p{exposed_port}:{exposed_port} --name {image_name} --restart always {image_name} {challenge.get('deploy_args', '')}", ] )