2
0
mirror of https://github.com/linka-cloud/d2vm.git synced 2025-06-23 13:52:26 +00:00

d2vm/run: add hetzner support

tests: add sysconfig tests for the supported distributions

Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
This commit is contained in:
2022-08-05 17:39:04 +02:00
parent 18af3227cc
commit 841bf6a7e4
14 changed files with 530 additions and 21 deletions

View File

@ -92,6 +92,11 @@ func RunInteractiveAndRemove(ctx context.Context, args ...string) error {
return cmd.Run()
}
func RunAndRemove(ctx context.Context, args ...string) error {
logrus.Tracef("running 'docker run --rm %s'", strings.Join(args, " "))
return Cmd(ctx, append([]string{"run", "--rm"}, args...)...)
}
func RunD2VM(ctx context.Context, image, version, cmd string, args ...string) error {
pwd, err := os.Getwd()
if err != nil {