1
0

use docker run --rm ...

此提交包含在:
2023-03-16 09:42:07 +00:00
父節點 51e4cfec30
當前提交 f10c4165a1

2
pew.go
查看文件

@ -142,7 +142,7 @@ const pathDevNull = "/dev/null"
func dockerRun(timeout time.Duration, container, workdir, command string) ( func dockerRun(timeout time.Duration, container, workdir, command string) (
output string, err error) { output string, err error) {
cmd := exec.Command("docker", "run", "-v", workdir+":/work", cmd := exec.Command("docker", "run", "--rm", "-v", workdir+":/work",
container, "bash", "-c", "cd /work && "+command) container, "bash", "-c", "cd /work && "+command)
timer := time.AfterFunc(timeout, func() { timer := time.AfterFunc(timeout, func() {