1
0
Fork 0

use docker run --rm ...

master
dump_stack() 2023-03-16 09:42:07 +00:00
parent 51e4cfec30
commit f10c4165a1
Signed by: dump_stack
GPG Key ID: BE44DA8C062D87DC
1 changed files with 1 additions and 1 deletions

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() {