def get_context(): console.echo("What's the context for building your docker image?") console.echo("For more information on 'docker build context' please see:") console.link( "https://docs.docker.com/engine/reference/commandline/build/#extended-description" ) return console.input("Build Context (default: '.')", ".")
def get_volume(): return console.input( "Enter a volume mapping (e.g. </local_path>:</container_path>)", "", validate=path_validator, invalid_message="Input must contain ':'.", )
def get_port(): return console.input( "What's the port of it's container?", mandatory=True, validate=lambda x: x.isnumeric, invalid_message="Input must be a number.", )
def get_target(): console.echo("What's the target stage for building your docker image?") console.echo("For more information on Docker's target stage please see:") console.link( "https://docs.docker.com/engine/reference/commandline/build/#specifying-target-build-stage---target" ) return console.input("Target (optional)", "")
def get_docker_file(): return console.input("Dockerfile (default: 'Dockerfile')", "Dockerfile")
def get_env(): console.input("Enter env variables (e.g. DEBUG=true)", "", validate=env_validator, invalid_message="Input must contain '='.")
def get_command(): return console.input( "What command should be executed on start? (optional)", "")
def get_deployment(): return console.input("What's the name of the deployment?", mandatory=True)