Updated to image thwich can handle musl
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
4e10b5c543
commit
9c8a3719ce
@ -41,7 +41,27 @@ func (p *Pipeline) WithRustBin(opts *RustBinOpts) *Pipeline {
|
||||
c := container.LoadImage(client, "harbor.server.kjuulh.io/docker-proxy/library/rust:buster")
|
||||
c = c.Exec(dagger.ContainerExecOpts{
|
||||
Args: []string{
|
||||
"apt install musl-tools",
|
||||
"apt", "update", "-y",
|
||||
},
|
||||
})
|
||||
if _, err := c.ExitCode(ctx); err != nil {
|
||||
return err
|
||||
}
|
||||
c = c.Exec(dagger.ContainerExecOpts{
|
||||
Args: []string{
|
||||
"apt", "install", "musl-tools", "-y",
|
||||
},
|
||||
})
|
||||
if _, err := c.ExitCode(ctx); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
c = c.Exec(dagger.ContainerExecOpts{
|
||||
Args: []string{
|
||||
"rustup",
|
||||
"target",
|
||||
"add",
|
||||
"x86_64-unknown-linux-musl",
|
||||
},
|
||||
})
|
||||
if _, err := c.ExitCode(ctx); err != nil {
|
||||
|
@ -11,18 +11,6 @@ import (
|
||||
func Build(ctx context.Context, container *dagger.Container, binName string) (dagger.FileID, error) {
|
||||
log.Printf("building binary: (binName=%s)", binName)
|
||||
c := container.Exec(dagger.ContainerExecOpts{
|
||||
Args: []string{
|
||||
"rustup",
|
||||
"target",
|
||||
"add",
|
||||
"x86_64-unknown-linux-musl",
|
||||
},
|
||||
})
|
||||
if _, err := c.ExitCode(ctx); err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
c = c.Exec(dagger.ContainerExecOpts{
|
||||
Args: []string{
|
||||
"cargo",
|
||||
"build",
|
||||
|
@ -4,7 +4,7 @@ name: "drone-dagger-test"
|
||||
|
||||
steps:
|
||||
- name: "build"
|
||||
image: harbor.server.kjuulh.io/kjuulh/bust:1667692696139
|
||||
image: harbor.server.kjuulh.io/kjuulh/bust:166769342945
|
||||
volumes:
|
||||
- name: dockersock
|
||||
path: /var/run
|
||||
|
Loading…
Reference in New Issue
Block a user