cool-easter-32542
06/28/2023, 5:49 PMtest
├── BUILD
├── Dockerfile
├── go.mod
└── main.go
pants tailor :: generates the BUILD file to look like this:
go_binary(
name="bin",
)
docker_image(
name="docker",
)
go_mod()
go_package(
name="test0",
)
If I run pants package test it builds a Docker image with a name of docker. I could just rename it to test, but that won't work because go_mod() has a default name of test and I also want the binary to have a name of test. If I copy the test target as is in the Dockerfile to /usr/local/bin, the binary ends up as /usr/local/bin/test/bin which is kind of weird. Playing hot potato with names isn't ideal, but I'm not sure if there is a better way.
pantsbuild/pants