package main

import (
	"os"
	"os/exec"
	"strconv"
)

func main() {
	uid := strconv.Itoa(os.Getuid())

	cmdargs := append([]string{"run", "-u", uid, "--rm", "-i"}, os.Args[1:]...)
	cmd := exec.Command("docker", cmdargs...)
	cmd.Stdout = os.Stdout
	cmd.Stderr = os.Stderr
	cmd.Run()
}

package main

import (
	"os"
	"os/exec"
	"strconv"
)

func main() {
	uid := strconv.Itoa(os.Getuid())

	cmdargs := append([]string{"run", "-u", uid, "--rm", "-i", "--"}, os.Args[1:]...)
	cmd := exec.Command("docker", cmdargs...)
	cmd.Stdout = os.Stdout
	cmd.Stderr = os.Stderr
	cmd.Run()
}

Use -- to prevent illegal args passing to run
Use -- to prevent illegal args passing to run

Signed-off-by: Eric Windisch <96f164ad4d9b2b0dacf8ebee2bb1eeb3aa69adf1@windisch.us>
