with mkdir

This commit is contained in:
2022-10-30 21:52:31 +01:00
parent a24a7bdeca
commit ade5768001
6 changed files with 51 additions and 6 deletions

View File

@@ -74,10 +74,11 @@ func (p *Pipeline) WithGolangBin(opts *GolangBinOpts) *Pipeline {
opts.BaseImage = "harbor.front.kjuulh.io/docker-proxy/library/busybox"
}
c := container.LoadImage(client, opts.BaseImage)
tempmount := fmt.Sprintf("/tmp/%s", opts.BinName)
usrbin := fmt.Sprintf("/bin/%s", opts.BinName)
log.Printf("binname: %s", bin)
c = c.Exec(dagger.ContainerExecOpts{
Args: []string{"mkdir", "-p", "/tmp/bin/", "/usr/bin/"},
})
tempmount := fmt.Sprintf("/tmp/bin/%s", opts.BinName)
usrbin := fmt.Sprintf("/usr/bin/%s", opts.BinName)
c = container.MountFileFromLoaded(c, bin, tempmount)
c = c.Exec(dagger.ContainerExecOpts{
Args: []string{"cp", tempmount, usrbin},