FIX to get image files container must be created temporarily
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-02-14 21:40:29 +01:00
parent 15917e498e
commit 564953fda2

View File

@@ -196,7 +196,9 @@ func (p Plugin) Exec() error {
if p.Build.IsPlugin {
cmds = append(cmds, exec.Command("mkdir", "-p", "plugin/rootfs"))
cmds = append(cmds, exec.Command(dockerExe, "save", "-o", "tmp.tar", p.Build.Name))
cmds = append(cmds, exec.Command(dockerExe, "create", "--name", "tmp", p.Build.Name))
cmds = append(cmds, exec.Command(dockerExe, "export", "-o", "tmp.tar", "tmp"))
cmds = append(cmds, exec.Command(dockerExe, "rm", "tmp"))
cmds = append(cmds, exec.Command(dockerExe, "image", "rm", p.Build.Name))
cmds = append(cmds, exec.Command("tar", "x", "-C", "plugin/rootfs", "-f", "tmp.tar"))
cmds = append(cmds, exec.Command("cp", p.Build.PluginConfig, "plugin/config.json"))