1
0

use docker run --rm ...

This commit is contained in:
2023-03-16 09:42:07 +00:00
parent 51e4cfec30
commit f10c4165a1

2
pew.go
View File

@ -142,7 +142,7 @@ const pathDevNull = "/dev/null"
func dockerRun(timeout time.Duration, container, workdir, command string) (
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)
timer := time.AfterFunc(timeout, func() {