trying to just mount instead
This commit is contained in:
parent
98a08fc3ef
commit
0376578c61
@ -2,7 +2,7 @@ module ci
|
|||||||
|
|
||||||
go 1.19
|
go 1.19
|
||||||
|
|
||||||
require git.front.kjuulh.io/kjuulh/dagger-go v0.0.19
|
require git.front.kjuulh.io/kjuulh/dagger-go v0.0.20
|
||||||
|
|
||||||
require (
|
require (
|
||||||
dagger.io/dagger v0.3.1 // indirect
|
dagger.io/dagger v0.3.1 // indirect
|
||||||
|
@ -57,6 +57,8 @@ git.front.kjuulh.io/kjuulh/dagger-go v0.0.18 h1:asW/jEmf3HORb6nqgUldoLge/UjEFFnI
|
|||||||
git.front.kjuulh.io/kjuulh/dagger-go v0.0.18/go.mod h1:N/EXT0aOJzph/9AXuFlaA2ZuKU0P8WzaDZQXLlAL0D8=
|
git.front.kjuulh.io/kjuulh/dagger-go v0.0.18/go.mod h1:N/EXT0aOJzph/9AXuFlaA2ZuKU0P8WzaDZQXLlAL0D8=
|
||||||
git.front.kjuulh.io/kjuulh/dagger-go v0.0.19 h1:IgpZ1X5ZDYl/byBSife1wXTBmFHNvHwf1MLw8AZ29R4=
|
git.front.kjuulh.io/kjuulh/dagger-go v0.0.19 h1:IgpZ1X5ZDYl/byBSife1wXTBmFHNvHwf1MLw8AZ29R4=
|
||||||
git.front.kjuulh.io/kjuulh/dagger-go v0.0.19/go.mod h1:N/EXT0aOJzph/9AXuFlaA2ZuKU0P8WzaDZQXLlAL0D8=
|
git.front.kjuulh.io/kjuulh/dagger-go v0.0.19/go.mod h1:N/EXT0aOJzph/9AXuFlaA2ZuKU0P8WzaDZQXLlAL0D8=
|
||||||
|
git.front.kjuulh.io/kjuulh/dagger-go v0.0.20 h1:iw/gnsaGe4SzqbRT6i14LPvu/Cpbe7XiCpnqFfkTLA8=
|
||||||
|
git.front.kjuulh.io/kjuulh/dagger-go v0.0.20/go.mod h1:N/EXT0aOJzph/9AXuFlaA2ZuKU0P8WzaDZQXLlAL0D8=
|
||||||
github.com/99designs/gqlgen v0.17.2/go.mod h1:K5fzLKwtph+FFgh9j7nFbRUdBKvTcGnsta51fsMTn3o=
|
github.com/99designs/gqlgen v0.17.2/go.mod h1:K5fzLKwtph+FFgh9j7nFbRUdBKvTcGnsta51fsMTn3o=
|
||||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||||
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
||||||
|
@ -73,18 +73,10 @@ func (p *Pipeline) WithGolangBin(opts *GolangBinOpts) *Pipeline {
|
|||||||
if opts.BaseImage == "" {
|
if opts.BaseImage == "" {
|
||||||
opts.BaseImage = "harbor.front.kjuulh.io/docker-proxy/library/busybox"
|
opts.BaseImage = "harbor.front.kjuulh.io/docker-proxy/library/busybox"
|
||||||
}
|
}
|
||||||
c := container.LoadImage(client, opts.BaseImage)
|
|
||||||
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)
|
usrbin := fmt.Sprintf("/usr/bin/%s", opts.BinName)
|
||||||
c = container.MountFileFromLoaded(c, bin, tempmount)
|
c := container.LoadImage(client, opts.BaseImage)
|
||||||
c = c.Exec(dagger.ContainerExecOpts{
|
c = container.MountFileFromLoaded(c, bin, usrbin)
|
||||||
Args: []string{
|
|
||||||
"cp", tempmount, opts.BinName,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
finalImage = c.WithEntrypoint([]string{usrbin})
|
finalImage = c.WithEntrypoint([]string{usrbin})
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
Reference in New Issue
Block a user