diff options
author | axtloss <axtlos@getcryst.al> | 2023-05-31 20:54:55 +0200 |
---|---|---|
committer | axtloss <axtlos@getcryst.al> | 2023-05-31 20:54:55 +0200 |
commit | 3999be65f43c30d22c93e28c8f1554c923973d23 (patch) | |
tree | 884c99b032e2fcd66960cc6c10395ae08e5ee7cf /src/main/java/io/github/jshipit/JshipIT.java | |
parent | 3bfe8ba05a429e726001b88c63f736f1bbed3509 (diff) | |
download | jshipit-3999be65f43c30d22c93e28c8f1554c923973d23.tar.gz jshipit-3999be65f43c30d22c93e28c8f1554c923973d23.tar.bz2 |
Add permissions configuration file
Diffstat (limited to 'src/main/java/io/github/jshipit/JshipIT.java')
-rwxr-xr-x | src/main/java/io/github/jshipit/JshipIT.java | 43 |
1 files changed, 38 insertions, 5 deletions
diff --git a/src/main/java/io/github/jshipit/JshipIT.java b/src/main/java/io/github/jshipit/JshipIT.java index 4304051..a48fc8e 100755 --- a/src/main/java/io/github/jshipit/JshipIT.java +++ b/src/main/java/io/github/jshipit/JshipIT.java @@ -49,7 +49,16 @@ public class JshipIT { apiRepo = "registry.docker.io"; } - ContainerManager containerManager = new ContainerManager(commandCreate.containerName, containerImage, commandCreate.containerImage.split(":")[1], apiRepo, containerRepo, null, dataStore); + ContainerManager containerManager = new ContainerManager( + commandCreate.containerName, + containerImage, + commandCreate.containerImage.split(":")[1], + apiRepo, + containerRepo, + commandCreate.containerIsolated, + dataStore + ); + containerManager.createContainer(); } else if (commands.getParsedCommand().equals("pull")) { @@ -67,15 +76,39 @@ public class JshipIT { } System.out.println("Pulling image " + containerImage + " from " + apiRepo + "/" + containerRepo); - dataStore.createImage(apiRepo, containerRepo, containerImage, commandPull.containerImage.split(":")[1]); + dataStore.createImage( + apiRepo, + containerRepo, + containerImage, + commandPull.containerImage.split(":")[1] + ); + } else if (commands.getParsedCommand().equals("start")) { - ContainerManager containerManager = new ContainerManager(commandStart.containerName, commandStart.containerCommand, commandStart.containerMount, dataStore); + ContainerManager containerManager = new ContainerManager( + commandStart.containerName, + commandStart.containerCommand, + commandStart.containerMount, + dataStore + ); + containerManager.runCommand(); } else if (commands.getParsedCommand().equals("shell")) { - ContainerManager containerManager = new ContainerManager(commandShell.containerName, "/bin/sh", commandShell.containerMount, dataStore); // A proper linux system should always have /bin/sh, skill issue if it doesn't + ContainerManager containerManager = new ContainerManager( + commandShell.containerName, + "/bin/sh", // A proper linux system should always have /bin/sh, skill issue if it doesn't + commandShell.containerMount, + dataStore + ); + containerManager.runCommand(); } else if (commands.getParsedCommand().equals("delete")) { - ContainerManager containerManager = new ContainerManager(commandDelete.containerName, null, null, dataStore); + ContainerManager containerManager = new ContainerManager( + commandDelete.containerName, + null, + null, + dataStore + ); + containerManager.deleteContainer(); } } |