Skip to content

Commit

Permalink
fix: --rm after docker container dies
Browse files Browse the repository at this point in the history
  • Loading branch information
Jmainguy committed Apr 21, 2024
1 parent db8769e commit 8e16390
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dockerPool.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func dockerStuff(db *sql.DB) {
}
randomname := fmt.Sprintf("%X", b)
// Spin up docker container
_, err := exec.Command("docker", "run", "-Pd", "--name", randomname, "--pids-limit", "20", "hub.soh.re/soh.re/site").Output()
_, err := exec.Command("docker", "run", "-Pd", "--rm", "--name", randomname, "--pids-limit", "20", "hub.soh.re/soh.re/site").Output()
check(err)
// Get port
portbyte, err := exec.Command("docker", "inspect", "--format='{{(index (index .NetworkSettings.Ports \"8080/tcp\") 0).HostPort}}'", randomname).Output()
Expand Down

0 comments on commit 8e16390

Please sign in to comment.