forked from Ivasoft/drone-docker
FIX to get image files container must be created temporarily
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -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"))
|
||||
|
||||
Reference in New Issue
Block a user