From 3bfe8ba05a429e726001b88c63f736f1bbed3509 Mon Sep 17 00:00:00 2001 From: axtloss Date: Mon, 29 May 2023 23:56:25 +0200 Subject: Allow bind mounting from host into container --- src/main/java/io/github/jshipit/Commands.java | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/main/java/io/github/jshipit/Commands.java') diff --git a/src/main/java/io/github/jshipit/Commands.java b/src/main/java/io/github/jshipit/Commands.java index ffdbe38..1b4b913 100644 --- a/src/main/java/io/github/jshipit/Commands.java +++ b/src/main/java/io/github/jshipit/Commands.java @@ -3,11 +3,17 @@ package io.github.jshipit; import com.beust.jcommander.Parameter; import com.beust.jcommander.Parameters; +import java.util.ArrayList; +import java.util.List; + @Parameters(commandDescription = "Open a shell in a container") class CommandShell { @Parameter(names = {"--name", "-n"}, description = "Name of the container", required = true) public String containerName; + @Parameter(names = {"--mount", "-m"}, description = "Mount a directory into the container", required = false) + public List containerMount = new ArrayList<>(); + @Parameter(names = "--help", help = true) private boolean help; } @@ -20,6 +26,9 @@ class CommandStart { @Parameter(names = {"--command", "-c"}, description = "Command to run in the container", required = false) public String containerCommand = null; + @Parameter(names = {"--mount", "-m"}, description = "Mount a directory into the container", required = false) + public List containerMount = new ArrayList<>(); + @Parameter(names = "--help", help = true) private boolean help; } -- cgit v1.2.3